mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
add isTrackingMembers flag to know if EncryptionUsers have been written
for this room
This commit is contained in:
parent
d813e6d932
commit
8da00f9a03
@ -260,6 +260,10 @@ export class Room extends EventEmitter {
|
|||||||
return !!this._summary.encryption;
|
return !!this._summary.encryption;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isTrackingMembers() {
|
||||||
|
return this._summary.isTrackingMembers;
|
||||||
|
}
|
||||||
|
|
||||||
async _getLastEventId() {
|
async _getLastEventId() {
|
||||||
const lastKey = this._syncWriter.lastMessageKey;
|
const lastKey = this._syncWriter.lastMessageKey;
|
||||||
if (lastKey) {
|
if (lastKey) {
|
||||||
|
@ -147,6 +147,7 @@ class SummaryData {
|
|||||||
this.heroes = copy ? copy.heroes : null;
|
this.heroes = copy ? copy.heroes : null;
|
||||||
this.canonicalAlias = copy ? copy.canonicalAlias : null;
|
this.canonicalAlias = copy ? copy.canonicalAlias : null;
|
||||||
this.hasFetchedMembers = copy ? copy.hasFetchedMembers : false;
|
this.hasFetchedMembers = copy ? copy.hasFetchedMembers : false;
|
||||||
|
this.isTrackingMembers = copy ? copy.isTrackingMembers : false;
|
||||||
this.lastPaginationToken = copy ? copy.lastPaginationToken : null;
|
this.lastPaginationToken = copy ? copy.lastPaginationToken : null;
|
||||||
this.avatarUrl = copy ? copy.avatarUrl : null;
|
this.avatarUrl = copy ? copy.avatarUrl : null;
|
||||||
this.notificationCount = copy ? copy.notificationCount : 0;
|
this.notificationCount = copy ? copy.notificationCount : 0;
|
||||||
@ -238,6 +239,10 @@ export class RoomSummary {
|
|||||||
return this._data.hasFetchedMembers;
|
return this._data.hasFetchedMembers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isTrackingMembers() {
|
||||||
|
return this._data.isTrackingMembers;
|
||||||
|
}
|
||||||
|
|
||||||
get lastPaginationToken() {
|
get lastPaginationToken() {
|
||||||
return this._data.lastPaginationToken;
|
return this._data.lastPaginationToken;
|
||||||
}
|
}
|
||||||
@ -262,6 +267,13 @@ export class RoomSummary {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeIsTrackingMembers(value, txn) {
|
||||||
|
const data = new SummaryData(this._data);
|
||||||
|
data.isTrackingMembers = value;
|
||||||
|
txn.roomSummary.set(data.serialize());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
writeSync(roomResponse, membership, isInitialSync, isTimelineOpen, txn) {
|
writeSync(roomResponse, membership, isInitialSync, isTimelineOpen, txn) {
|
||||||
// clear cloned flag, so cloneIfNeeded makes a copy and
|
// clear cloned flag, so cloneIfNeeded makes a copy and
|
||||||
// this._data is not modified if any field is changed.
|
// this._data is not modified if any field is changed.
|
||||||
|
Loading…
Reference in New Issue
Block a user