Commit a854f77a authored by Maxime Buquet's avatar Maxime Buquet

Merge branch 'mam-fix-disco' into 'master'

mam: disco before query only if groupchat

See merge request poezio/poezio!65
parents afdd4377 49d1a425
......@@ -89,7 +89,8 @@ async def query(
callback: Optional[Callable] = None,
) -> None:
try:
iq = await core.xmpp.plugin['xep_0030'].get_info(jid=remote_jid)
query_jid = remote_jid if groupchat else JID(core.xmpp.boundjid.bare)
iq = await core.xmpp.plugin['xep_0030'].get_info(jid=query_jid)
except (IqError, IqTimeout):
raise DiscoInfoException
if 'urn:xmpp:mam:2' not in iq['disco_info'].get_features():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment