mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-04 05:38:57 +01:00
Show heroes if room name or canonical alias are empty
Fixes #4194 Signed-off-by: Katie Wolfe <katie@dnaf.moe>
This commit is contained in:
parent
1a63c7c281
commit
7f025eb425
1 changed files with 3 additions and 5 deletions
|
@ -583,19 +583,17 @@ class SyncHandler(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
# if the room has a name or canonical_alias set, we can skip
|
# 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
|
# calculating heroes.
|
||||||
# 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:
|
if name_id:
|
||||||
name = yield self.store.get_event(name_id, allow_none=True)
|
name = yield self.store.get_event(name_id, allow_none=True)
|
||||||
if name and name.content:
|
if name and name.content and name.content.name:
|
||||||
defer.returnValue(summary)
|
defer.returnValue(summary)
|
||||||
|
|
||||||
if canonical_alias_id:
|
if canonical_alias_id:
|
||||||
canonical_alias = yield self.store.get_event(
|
canonical_alias = yield self.store.get_event(
|
||||||
canonical_alias_id, allow_none=True,
|
canonical_alias_id, allow_none=True,
|
||||||
)
|
)
|
||||||
if canonical_alias and canonical_alias.content:
|
if canonical_alias and canonical_alias.content and canonical_alias.content.alias:
|
||||||
defer.returnValue(summary)
|
defer.returnValue(summary)
|
||||||
|
|
||||||
joined_user_ids = [
|
joined_user_ids = [
|
||||||
|
|
Loading…
Reference in a new issue