diff options
author | root <madhurgarg96@gmail.com> | 2019-08-31 02:13:27 +0530 |
---|---|---|
committer | root <madhurgarg96@gmail.com> | 2019-09-05 17:42:27 +0530 |
commit | 5e81fe276058f9ad884b76789ae52797057d3788 (patch) | |
tree | de68edc0964c234700f06eda9d73c483a42d90f0 | |
parent | 81d9c267d358ede6a5fc4acdc53c1b5b02e1ff56 (diff) | |
download | poezio-5e81fe276058f9ad884b76789ae52797057d3788.tar.gz poezio-5e81fe276058f9ad884b76789ae52797057d3788.tar.bz2 poezio-5e81fe276058f9ad884b76789ae52797057d3788.tar.xz poezio-5e81fe276058f9ad884b76789ae52797057d3788.zip |
Removed error messages on startup.
-rw-r--r-- | poezio/mam.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/poezio/mam.py b/poezio/mam.py index 28be3538..08bab727 100644 --- a/poezio/mam.py +++ b/poezio/mam.py @@ -67,7 +67,8 @@ async def query(tab, remote_jid, action, amount, top, start=None, end=None, befo try: iq = await tab.core.xmpp.plugin['xep_0030'].get_info(jid=remote_jid) except (IqError, IqTimeout): - return tab.core.information('Failed to retrieve messages', 'Error') + if action is 'scroll': + return tab.core.information('%s : Failed to retrieve messages' % remote_jid, 'Error') if 'urn:xmpp:mam:2' not in iq['disco_info'].get_features() and action is 'scroll': return tab.core.information("%s doesn't support MAM." % remote_jid, "Info") if top: @@ -81,7 +82,7 @@ async def query(tab, remote_jid, action, amount, top, start=None, end=None, befo iterator=True, reverse=top, end=end, rsm={'max':amount}) except (IqError, IqTimeout): if action is 'scroll': - return tab.core.information('Failed to retrieve messages', 'Error') + return tab.core.information('%s : Failed to retrieve messages' % remote_jid, 'Error') else: try: if before is not None: @@ -92,20 +93,20 @@ async def query(tab, remote_jid, action, amount, top, start=None, end=None, befo iterator=True, reverse=top, end=end, rsm={'max':amount}) except (IqError, IqTimeout): if action is 'scroll': - return tab.core.information('Failed to retrieve messages', 'Error') + return tab.core.information('%s : Failed to retrieve messages' % remote_jid, 'Error') else: if 'conference' in list(iq['disco_info']['identities'])[0]: try: results = tab.core.xmpp['xep_0313'].retrieve(jid=remote_jid, iterator=True, reverse=top, start=start, end=end) except (IqError, IqTimeout): - return tab.core.information('Failed to retrieve messages', 'Error') + return tab.core.information('%s : Failed to retrieve messages' % remote_jid, 'Error') else: try: results = tab.core.xmpp['xep_0313'].retrieve(with_jid=remote_jid, iterator=True, reverse=top, start=start, end=end) except (IqError, IqTimeout): - return tab.core.information('Failed to retrieve messages', 'Error') + return tab.core.information('%s : Failed to retrieve messages' % remote_jid, 'Error') msg_count = 0 msgs = [] async for rsm in results: |