Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update synapse/server_notices/server_notices_manager.py
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Johnston <erikj@jki.re>
  • Loading branch information
MatMaul and erikjohnston authored Dec 12, 2023
1 parent d8aaaef commit 66debd9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion synapse/server_notices/server_notices_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,16 @@ async def _update_room_info(
"",
)

if room_info_event and room_info_event.get(info_content_key) == info_value:
existing_info_value = None
if room_info_event:
existing_info_value = room_info_event.get(info_content_key)
if existing_info_value == info_value:
return
if not existing_info_value and not info_value:
# A missing `info_value` can either be represented by a None
# or an empty string, so we assume that if they're both falsey
# they're equivalent.
return
return

if info_value is None:
Expand Down

0 comments on commit 66debd9

Please sign in to comment.