From 49d1a425a32850987a7f517f83cd0682d63d56a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 7 Feb 2020 16:05:36 +0100 Subject: mam: disco before query only if groupchat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/mam.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(): -- cgit v1.2.3