comparison sat/plugins/plugin_xep_0060.py @ 2911:cd391ea847cb

tools (sat_defer), plugin XEP-0060: added a function "stanza2NotFound" to convert item-not-found StanzaError to exceptions.NotFound in an errback
author Goffi <goffi@goffi.org>
date Sun, 14 Apr 2019 08:21:51 +0200
parents 0b7ce5daee9b
children ab2696e34d29
comparison
equal deleted inserted replaced
2910:b2f323237fce 2911:cd391ea847cb
609 orderBy = extra.get(C.KEY_ORDER_BY), 609 orderBy = extra.get(C.KEY_ORDER_BY),
610 rsm_request = rsm_request 610 rsm_request = rsm_request
611 ) 611 )
612 # we have no MAM data here, so we add None 612 # we have no MAM data here, so we add None
613 d.addCallback(lambda data: data + (None,)) 613 d.addCallback(lambda data: data + (None,))
614 d.addErrback(sat_defer.stanza2NotFound)
614 d.addTimeout(TIMEOUT, reactor) 615 d.addTimeout(TIMEOUT, reactor)
615 else: 616 else:
616 # if mam is requested, we have to do a totally different query 617 # if mam is requested, we have to do a totally different query
617 if self._mam is None: 618 if self._mam is None:
618 raise exceptions.NotFound(u"MAM (XEP-0313) plugin is not available") 619 raise exceptions.NotFound(u"MAM (XEP-0313) plugin is not available")