Mercurial > libervia-backend
changeset 3957:b8ab6da58ac8
plugin XEP-0277: `signed` flag can now be used in `extra` to use sign the blog post:
rel 381
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Oct 2022 18:47:17 +0200 |
parents | 3cb9ade2ab84 |
children | e2a5f2f5e57b |
files | sat/plugins/plugin_xep_0277.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0277.py Fri Oct 28 18:47:17 2022 +0200 +++ b/sat/plugins/plugin_xep_0277.py Fri Oct 28 18:47:17 2022 +0200 @@ -983,7 +983,11 @@ ): return None - extra = {"encrypted": True} if data.get("encrypted") else None + extra = {} + for key in ("encrypted", "signed"): + value = data.get(key) + if value is not None: + extra[key] = value await self._p.publish(client, service, node, [item], extra=extra) return item_id