Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0060.py @ 3948:cd4d95b3fed3
plugin OXPS, XEP-0060: indicate which items were e2ee:
the new `encryption` key is added to `getItems` metadata if items were e2ee, it contains a
map from item ID to encryption metadata.
rel 380
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 15 Oct 2022 20:38:33 +0200 |
parents | e345d93fb6e5 |
children | 722c25818778 |
comparison
equal
deleted
inserted
replaced
3947:08c1d5485411 | 3948:cd4d95b3fed3 |
---|---|
852 metadata["complete"] = None | 852 metadata["complete"] = None |
853 else: | 853 else: |
854 # normally we have a strict equality here but XEP-0059 states | 854 # normally we have a strict equality here but XEP-0059 states |
855 # that index MAY be approximative, so just in case… | 855 # that index MAY be approximative, so just in case… |
856 metadata["complete"] = index + len(items) >= count | 856 metadata["complete"] = index + len(items) >= count |
857 # encrypted metadata can be added by plugins in XEP-0060_items trigger | |
858 if "encrypted" in extra: | |
859 metadata["encrypted"] = extra["encrypted"] | |
857 | 860 |
858 return (items, metadata) | 861 return (items, metadata) |
859 | 862 |
860 # @defer.inlineCallbacks | 863 # @defer.inlineCallbacks |
861 # def getItemsFromMany(self, service, data, max_items=None, sub_id=None, rsm=None, profile_key=C.PROF_KEY_NONE): | 864 # def getItemsFromMany(self, service, data, max_items=None, sub_id=None, rsm=None, profile_key=C.PROF_KEY_NONE): |