summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-02-07 16:05:36 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2020-02-07 16:13:21 +0100
commit49d1a425a32850987a7f517f83cd0682d63d56a0 (patch)
tree6439f635c7b4bfb9d38079610ea67bdd776d2611
parent412aeff6dc59c77f3d686de10f261d2a1ed67803 (diff)
downloadpoezio-49d1a425a32850987a7f517f83cd0682d63d56a0.tar.gz
poezio-49d1a425a32850987a7f517f83cd0682d63d56a0.tar.bz2
poezio-49d1a425a32850987a7f517f83cd0682d63d56a0.tar.xz
poezio-49d1a425a32850987a7f517f83cd0682d63d56a0.zip
mam: disco before query only if groupchat
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-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():