plugin XEP-0045: Use disco as fallback for is_room:

If a room was not joined (e.g., due to failure), `is_room` was wrongly returning `False`.
Disco identity is now used as fallback to detect correctly is an entity is a room or not.
This changes makes `is_room` async, and by extension `get_bare_or_full` too.
This commit is contained in:
Goffi 2026-08-12 18:05:17 +02:00
commit dc9e3e98d5

View file

@ -314,7 +314,7 @@ class XEP_0444:
store = False
else:
# we use bare JIDs for one2one message, except if the recipient is from a MUC
if self._m.is_room(client, dest_jid):
if await self._m.is_room(client, dest_jid):
# this is a private message in a room, we need to use the MUC JID
reacting_jid = self._m.get_room_user_jid(client, dest_jid.userhostJID())
else: