Fix appservice EDUs failing to send if the EDU doesn't have a room ID (#13236)

* Fix appservice EDUs failing to send if the EDU doesn't have a room ID

As is in the case of presence.

* changelog

* linter

* fix linter again
This commit is contained in:
Travis Ralston 2022-07-11 07:12:28 -06:00 committed by GitHub
parent 28d96cb2b4
commit a113011794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

1
changelog.d/13236.bugfix Normal file
View File

@ -0,0 +1 @@
Fix appservices not receiving room-less EDUs, like presence, if enabled.

View File

@ -319,7 +319,9 @@ class _ServiceQueuer:
rooms_of_interesting_users.update(event.room_id for event in events)
# EDUs
rooms_of_interesting_users.update(
ephemeral["room_id"] for ephemeral in ephemerals
ephemeral["room_id"]
for ephemeral in ephemerals
if ephemeral.get("room_id") is not None
)
# Look up the AS users in those rooms