Exclude m.room.member events from initial sync

This commit is contained in:
Konstantinos Sideris 2017-04-27 00:32:33 +03:00
parent 9e45a95d41
commit 1a82150aa8
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@
*/ */
#include <QDebug> #include <QDebug>
#include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
#include <QNetworkReply> #include <QNetworkReply>
@ -452,8 +453,13 @@ void MatrixClient::sendTextMessage(const QString &roomid, const QString &msg) no
void MatrixClient::initialSync() noexcept void MatrixClient::initialSync() noexcept
{ {
QJsonArray excluded_event_types = {
QString("m.room.member"),
};
QJsonObject filter{{"room", QJsonObject filter{{"room",
QJsonObject{{"timeline", QJsonObject{{"limit", 70}}}, QJsonObject{{"timeline", QJsonObject{{"limit", 70}}},
{"state", QJsonObject{{"not_types", excluded_event_types}}},
{"ephemeral", QJsonObject{{"limit", 0}}}}}, {"ephemeral", QJsonObject{{"limit", 0}}}}},
{"presence", QJsonObject{{"limit", 0}}}}; {"presence", QJsonObject{{"limit", 0}}}};