summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-04 22:11:55 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-04 22:11:55 +0300
commit11a32821365ccd6390f1630b03f16fbf32129d74 (patch)
tree58ba84c5ee32066a2f7f2c9d13afc7621e85e331
parentPut typing notifications above the text input (diff)
downloadnheko-11a32821365ccd6390f1630b03f16fbf32129d74.tar.xz
Remove full_state from initial sync
-rw-r--r--src/MatrixClient.cc24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc
index 265b51ce..70fa4205 100644
--- a/src/MatrixClient.cc
+++ b/src/MatrixClient.cc
@@ -610,11 +610,12 @@ MatrixClient::registerUser(const QString &user, const QString &pass, const QStri
 void
 MatrixClient::sync() noexcept
 {
-        QJsonObject filter{ { "room",
-                              QJsonObject{
-                                { "include_leave", true },
-                              } },
-                            { "presence", QJsonObject{ { "limit", 0 } } } };
+        QJsonObject filter{
+                { "room",
+                  QJsonObject{
+                    { "include_leave", true },
+                  } },
+        };
 
         QUrlQuery query;
         query.addQueryItem("set_presence", "online");
@@ -686,19 +687,8 @@ MatrixClient::sendRoomMessage(matrix::events::MessageEventType ty,
 void
 MatrixClient::initialSync() noexcept
 {
-        QJsonArray excluded_presence = {
-                QString("m.presence"),
-        };
-
-        QJsonObject filter{ { "room",
-                              QJsonObject{ { "timeline", QJsonObject{ { "limit", 20 } } },
-                                           { "ephemeral", QJsonObject{ { "limit", 0 } } } } },
-                            { "presence", QJsonObject{ { "not_types", excluded_presence } } } };
-
         QUrlQuery query;
-        query.addQueryItem("full_state", "true");
-        query.addQueryItem("set_presence", "online");
-        query.addQueryItem("filter", QJsonDocument(filter).toJson(QJsonDocument::Compact));
+        query.addQueryItem("timeout", 0);
         query.addQueryItem("access_token", token_);
 
         QUrl endpoint(server_);