This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 3042875  Logout logiс fixed.
3042875 is described below

commit 3042875164b2b71bc8b251f75a95e00cf1a6fa18
Author: Sergey Kamov <[email protected]>
AuthorDate: Fri Oct 9 09:42:40 2020 +0300

    Logout logiс fixed.
---
 .../scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
index 4d725c9..60b6569 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
@@ -505,7 +505,12 @@ class NCBasicRestApi extends NCRestApi with LazyLogging 
with NCOpenCensusTrace w
             startScopedSpan("signout$", "acsTok" → req.acsTok) { span ⇒
                 checkLength("acsTok" → req.acsTok)
 
-                authenticate(req.acsTok)
+                val usr = authenticate(req.acsTok)
+
+                for (mdlId ← NCProbeManager.getAllProbes(usr.companyId, 
span).flatMap(_.models.map(_.id))) {
+                    NCProbeManager.clearConversation(usr.id, mdlId, span)
+                    NCProbeManager.clearDialog(usr.id, mdlId, span)
+                }
 
                 NCUserManager.signout(req.acsTok, span)
 

Reply via email to