summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-02-07 16:18:04 +0100
committerMaxime Buquet <pep@bouah.net>2020-02-07 16:18:04 +0100
commita854f77afafed0afa0e8153fc01ba04b1791734f (patch)
tree6439f635c7b4bfb9d38079610ea67bdd776d2611
parentafdd43774fd2455d17348285ee34eff70d1af247 (diff)
parent49d1a425a32850987a7f517f83cd0682d63d56a0 (diff)
downloadpoezio-a854f77afafed0afa0e8153fc01ba04b1791734f.tar.gz
poezio-a854f77afafed0afa0e8153fc01ba04b1791734f.tar.bz2
poezio-a854f77afafed0afa0e8153fc01ba04b1791734f.tar.xz
poezio-a854f77afafed0afa0e8153fc01ba04b1791734f.zip
Merge branch 'mam-fix-disco' into 'master'
mam: disco before query only if groupchat See merge request poezio/poezio!65
-rw-r--r--poezio/mam.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/mam.py b/poezio/mam.py
index ad1c07e2..0f745f30 100644
--- a/poezio/mam.py
+++ b/poezio/mam.py
@@ -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():