mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
show heroes if a room has a 'deleted' name/canonical_alias (#3851)
This commit is contained in:
parent
fa0d464fa4
commit
2ac1abbc7e
1
changelog.d/3851.bugfix
Normal file
1
changelog.d/3851.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Show heroes if room name/canonical alias has been deleted
|
@ -562,7 +562,20 @@ class SyncHandler(object):
|
|||||||
details.get(Membership.INVITE, empty_ms).count
|
details.get(Membership.INVITE, empty_ms).count
|
||||||
)
|
)
|
||||||
|
|
||||||
if name_id or canonical_alias_id:
|
# if the room has a name or canonical_alias set, we can skip
|
||||||
|
# calculating heroes. we assume that if the event has contents, it'll
|
||||||
|
# be a valid name or canonical_alias - i.e. we're checking that they
|
||||||
|
# haven't been "deleted" by blatting {} over the top.
|
||||||
|
if name_id:
|
||||||
|
name = yield self.store.get_event(name_id, allow_none=False)
|
||||||
|
if name and name.content:
|
||||||
|
defer.returnValue(summary)
|
||||||
|
|
||||||
|
if canonical_alias_id:
|
||||||
|
canonical_alias = yield self.store.get_event(
|
||||||
|
canonical_alias_id, allow_none=False,
|
||||||
|
)
|
||||||
|
if canonical_alias and canonical_alias.content:
|
||||||
defer.returnValue(summary)
|
defer.returnValue(summary)
|
||||||
|
|
||||||
joined_user_ids = [
|
joined_user_ids = [
|
||||||
|
Loading…
Reference in New Issue
Block a user