Commit 8470e525 authored by Madhur Garg's avatar Madhur Garg

Added check for MAM support in disco#info

parent a592baf4
......@@ -41,6 +41,10 @@ async def query(self, remote_jid, start, end, top):
self.start_date = start
self.end_date = end
text_buffer = self._text_buffer
def callback(iq):
if 'urn:xmpp:mam:2' not in iq['disco_info'].get_features():
return self.core.information("This MUC doesn't support MAM.", "Error")
self.core.xmpp.plugin['xep_0030'].get_info(jid=remote_jid, callback=callback)
results = self.core.xmpp['xep_0313'].retrieve(jid=self.remote_jid,
iterator=True, reverse=top, start=self.start_date, end=self.end_date)
msg_count = 0
......
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