mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Merge branch 'develop' into luke/groups-update-on-invite
This commit is contained in:
commit
b9dc5cb5ed
2 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,10 @@ class FlairStore extends EventEmitter {
|
|||
return groupSupport;
|
||||
}
|
||||
|
||||
invalidatePublicisedGroups(userId) {
|
||||
delete this._userGroups[userId];
|
||||
}
|
||||
|
||||
getPublicisedGroupsCached(matrixClient, userId) {
|
||||
if (this._userGroups[userId]) {
|
||||
return Promise.resolve(this._userGroups[userId]);
|
||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
import EventEmitter from 'events';
|
||||
import { groupMemberFromApiObject, groupRoomFromApiObject } from '../groups';
|
||||
import FlairStore from './FlairStore';
|
||||
|
||||
/**
|
||||
* Stores the group summary for a room and provides an API to change it and
|
||||
|
@ -149,6 +150,7 @@ export default class GroupStore extends EventEmitter {
|
|||
setGroupPublicity(isPublished) {
|
||||
return this._matrixClient
|
||||
.setGroupPublicity(this.groupId, isPublished)
|
||||
.then(() => { FlairStore.invalidatePublicisedGroups(this._matrixClient.credentials.userId); })
|
||||
.then(this._fetchSummary.bind(this));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue