mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +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
|
void
|
||||||
MatrixClient::sync() noexcept
|
MatrixClient::sync() noexcept
|
||||||
{
|
{
|
||||||
QJsonObject filter{ { "room",
|
QJsonObject filter{
|
||||||
QJsonObject{
|
{ "room",
|
||||||
{ "include_leave", true },
|
QJsonObject{
|
||||||
} },
|
{ "include_leave", true },
|
||||||
{ "presence", QJsonObject{ { "limit", 0 } } } };
|
} },
|
||||||
|
};
|
||||||
|
|
||||||
QUrlQuery query;
|
QUrlQuery query;
|
||||||
query.addQueryItem("set_presence", "online");
|
query.addQueryItem("set_presence", "online");
|
||||||
|
@ -686,19 +687,8 @@ MatrixClient::sendRoomMessage(matrix::events::MessageEventType ty,
|
||||||
void
|
void
|
||||||
MatrixClient::initialSync() noexcept
|
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;
|
QUrlQuery query;
|
||||||
query.addQueryItem("full_state", "true");
|
query.addQueryItem("timeout", 0);
|
||||||
query.addQueryItem("set_presence", "online");
|
|
||||||
query.addQueryItem("filter", QJsonDocument(filter).toJson(QJsonDocument::Compact));
|
|
||||||
query.addQueryItem("access_token", token_);
|
query.addQueryItem("access_token", token_);
|
||||||
|
|
||||||
QUrl endpoint(server_);
|
QUrl endpoint(server_);
|
||||||
|
|
Loading…
Reference in a new issue