From 1a82150aa83bbf166e86e5356aa524a806c932fd Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 27 Apr 2017 00:32:33 +0300 Subject: [PATCH] Exclude m.room.member events from initial sync --- src/MatrixClient.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index 9299c7eb..381f5023 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -16,6 +16,7 @@ */ #include +#include #include #include #include @@ -452,8 +453,13 @@ void MatrixClient::sendTextMessage(const QString &roomid, const QString &msg) no void MatrixClient::initialSync() noexcept { + QJsonArray excluded_event_types = { + QString("m.room.member"), + }; + QJsonObject filter{{"room", QJsonObject{{"timeline", QJsonObject{{"limit", 70}}}, + {"state", QJsonObject{{"not_types", excluded_event_types}}}, {"ephemeral", QJsonObject{{"limit", 0}}}}}, {"presence", QJsonObject{{"limit", 0}}}};