mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Remove full_state from initial sync
This commit is contained in:
parent
28b3a3fde0
commit
11a3282136
1 changed files with 7 additions and 17 deletions
|
@ -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_);
|
||||
|
|
Loading…
Reference in a new issue