# HG changeset patch # User Goffi # Date 1547307580 -3600 # Node ID 2f2b2f53600878c70fea3b339759b45017e62461 # Parent f4d569dc8e6b4aedd66e8b7250c195ab751fbfc1 wokkel/mam: added "attributes" dict in onArchiveRequest return value, so attributes can be specified diff -r f4d569dc8e6b -r 2f2b2f536008 sat_tmp/wokkel/mam.py --- a/sat_tmp/wokkel/mam.py Sun Jan 06 17:25:30 2019 +0100 +++ b/sat_tmp/wokkel/mam.py Sat Jan 12 16:39:40 2019 +0100 @@ -495,9 +495,9 @@ """ Called when a message archive request has been received. - This replies with the list of archived message and the result - @return: A tuple with list of message data (id, element, data) and RSM element - @rtype: C{tuple} + This will send the list of archived message and return MAM element + @return: The MAM element + @rtype: L{Element} """ iq.handled = True mam_ = self._request_class.fromElement(iq) @@ -525,11 +525,13 @@ self.xmlstream.send(msg) def cb(result): - msg_data, rsm_elt = result + msg_data, rsm_elt, attributes = result for data in msg_data: forwardMessage(*data) fin_elt = domish.Element((NS_MAM, 'fin')) + for key, value in attributes.items(): + fin_elt[key] = value if rsm_elt is not None: fin_elt.addChild(rsm_elt)