plugin XEP-0045: avoir crash if subject is not set when _get_room_joined_args is called.

This commit is contained in:
Goffi 2023-12-13 22:00:25 +01:00
commit 79fd3d7c13

View file

@ -278,7 +278,10 @@ class XEP_0045(object):
room.roomJID.userhost(),
XEP_0045._get_occupants(room),
room.nick,
room.subject,
# FIXME: getattr below is a Q&D fix as `subject` may not be set in early call
# of _get_rooms_joined (during `join` call). The whole workflow of this
# plugin should be refactored.
getattr(room, "subject", ""),
[s.name for s in room.statuses],
profile
]