comparison sat/plugins/plugin_xep_0277.py @ 3972:5fbdf986670c

plugin pte: Pubsub Target Encryption implementation: This plugin lets encrypt a few items for a specific set of entities. rel 382
author Goffi <goffi@goffi.org>
date Mon, 31 Oct 2022 13:46:51 +0100
parents b8ab6da58ac8
children 74d4c9ff893d
comparison
equal deleted inserted replaced
3971:9b1d74a6b48c 3972:5fbdf986670c
982 "XEP-0277_send", client, service, node, item, data 982 "XEP-0277_send", client, service, node, item, data
983 ): 983 ):
984 return None 984 return None
985 985
986 extra = {} 986 extra = {}
987 for key in ("encrypted", "signed"): 987 for key in ("encrypted", "encrypted_for", "signed"):
988 value = data.get(key) 988 value = data.get(key)
989 if value is not None: 989 if value is not None:
990 extra[key] = value 990 extra[key] = value
991 991
992 await self._p.publish(client, service, node, [item], extra=extra) 992 await self._p.publish(client, service, node, [item], extra=extra)