# HG changeset patch # User Goffi # Date 1702501225 -3600 # Node ID 8b673bb307c15865cb81b098c911b701d91ebdbe # Parent 22cd3094cd1e6de81f896bb3ce1aaa82e8a0ec87 plugin XEP-0045: avoir crash if `subject` is not set when `_get_room_joined_args` is called. diff -r 22cd3094cd1e -r 8b673bb307c1 libervia/backend/plugins/plugin_xep_0045.py --- 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 ]