Invalidate the user's public groups cache when changing group publicity

This will make the changes to their Flair "live", but only from the user's own perspective.
This commit is contained in:
Luke Barnard 2017-10-23 15:28:38 +01:00
parent 03f4e6c622
commit 0ff5b9c6a7
2 changed files with 6 additions and 0 deletions

View file

@ -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]);