Mercurial > libervia-backend
changeset 4196:8b673bb307c1
plugin XEP-0045: avoir crash if `subject` is not set when `_get_room_joined_args` is called.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Dec 2023 22:00:25 +0100 |
parents | 22cd3094cd1e |
children | 9cda0347e0ac |
files | libervia/backend/plugins/plugin_xep_0045.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0045.py Wed Dec 13 22:00:25 2023 +0100 +++ b/libervia/backend/plugins/plugin_xep_0045.py Wed Dec 13 22:00:25 2023 +0100 @@ -278,7 +278,10 @@ 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 ]