summary refs log tree commit diff
path: root/src/ChatPage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-17 16:53:14 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-17 16:53:14 +0300
commitd081fe9b9e248de9bd0452871e6bf4dbae9e603a (patch)
treea4639b73d5d1c6a7bcfa6dcf06601240bc58c025 /src/ChatPage.cc
parentCorrectly mark received messages whose response came after /sync (diff)
downloadnheko-d081fe9b9e248de9bd0452871e6bf4dbae9e603a.tar.xz
Setup BinTray
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r--src/ChatPage.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc
index cffb2a46..e543cdf9 100644
--- a/src/ChatPage.cc
+++ b/src/ChatPage.cc
@@ -1084,7 +1084,7 @@ ChatPage::trySync()
                                   if (!http::v2::is_logged_in())
                                           return;
 
-                                  emit dropToLoginPageCb(msg);
+                                  emit tryDelayedSyncCb();
                                   return;
                           }
 
@@ -1095,16 +1095,16 @@ ChatPage::trySync()
                                   emit trySyncCb();
                                   return;
                           }
-                          case 401:
-                          case 403: {
+                          default: {
                                   if (!http::v2::is_logged_in())
                                           return;
 
-                                  emit dropToLoginPageCb(msg);
-                                  return;
-                          }
-                          default: {
-                                  emit tryDelayedSyncCb();
+                                  if (err->matrix_error.errcode ==
+                                      mtx::errors::ErrorCode::M_UNKNOWN_TOKEN)
+                                          emit dropToLoginPageCb(msg);
+                                  else
+                                          emit tryDelayedSyncCb();
+
                                   return;
                           }
                           }