Remove full_state from initial sync

This commit is contained in:
Konstantinos Sideris 2017-10-04 22:11:55 +03:00
parent 28b3a3fde0
commit 11a3282136

View file

@ -610,11 +610,12 @@ MatrixClient::registerUser(const QString &user, const QString &pass, const QStri
void
MatrixClient::sync() noexcept
{
QJsonObject filter{ { "room",
QJsonObject filter{
{ "room",
QJsonObject{
{ "include_leave", true },
} },
{ "presence", QJsonObject{ { "limit", 0 } } } };
};
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_);