|
|
@ -42,30 +42,36 @@ MatrixClient::MatrixClient(QString server, QObject *parent) |
|
|
|
txn_id_ = settings.value("client/transaction_id", 1).toInt(); |
|
|
|
txn_id_ = settings.value("client/transaction_id", 1).toInt(); |
|
|
|
|
|
|
|
|
|
|
|
QJsonObject default_filter{ |
|
|
|
QJsonObject default_filter{ |
|
|
|
{"room", |
|
|
|
{ |
|
|
|
QJsonObject{ |
|
|
|
"room", |
|
|
|
{"include_leave", true}, |
|
|
|
QJsonObject{ |
|
|
|
{"account_data", |
|
|
|
{"include_leave", true}, |
|
|
|
QJsonObject{ |
|
|
|
{ |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
"account_data", |
|
|
|
}, |
|
|
|
QJsonObject{ |
|
|
|
}, |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
},{"account_data", |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"account_data", |
|
|
|
QJsonObject{ |
|
|
|
QJsonObject{ |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
},{"presence", |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"presence", |
|
|
|
QJsonObject{ |
|
|
|
QJsonObject{ |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
{"not_types", QJsonArray{"*"}}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
filter_ = settings.value( |
|
|
|
filter_ = settings |
|
|
|
"client/sync_filter", |
|
|
|
.value("client/sync_filter", |
|
|
|
QJsonDocument(default_filter).toJson(QJsonDocument::Compact) |
|
|
|
QJsonDocument(default_filter).toJson(QJsonDocument::Compact)) |
|
|
|
).toString(); |
|
|
|
.toString(); |
|
|
|
|
|
|
|
|
|
|
|
connect(this, |
|
|
|
connect(this, |
|
|
|
&QNetworkAccessManager::networkAccessibleChanged, |
|
|
|
&QNetworkAccessManager::networkAccessibleChanged, |
|
|
|