You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Guest room ID fixes / initialSync support
This commit is contained in:
@@ -2080,6 +2080,10 @@ function doInitialSync(client, historyLen, includeArchived, attempt) {
|
||||
if (includeArchived) {
|
||||
qps.archived = true;
|
||||
}
|
||||
if (client._guestRooms && client._isGuest) {
|
||||
console.log(client._guestRooms);
|
||||
qps.room_id = JSON.stringify(client._guestRooms);
|
||||
}
|
||||
client._http.authedRequest(
|
||||
undefined, "GET", "/initialSync", qps
|
||||
).done(function(data) {
|
||||
@@ -2251,6 +2255,16 @@ MatrixClient.prototype.startClient = function(opts) {
|
||||
};
|
||||
|
||||
function prepareForSync(client, attempt) {
|
||||
if (client.isGuest()) {
|
||||
// no push rules for guests
|
||||
doInitialSync(
|
||||
client,
|
||||
client._config.initialSyncLimit,
|
||||
client._config.includeArchivedRooms
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
attempt = attempt || 1;
|
||||
client.pushRules().done(function(result) {
|
||||
client.pushRules = result;
|
||||
|
Reference in New Issue
Block a user