plugin OXPS: fix triggers return values:
rel 381
This commit is contained in:
parent
39181f0bff
commit
14b115358e
1 changed files with 4 additions and 3 deletions
|
|
@ -694,9 +694,9 @@ class PubsubEncryption:
|
|||
items: List[domish.Element],
|
||||
rsm_response: rsm.RSMResponse,
|
||||
extra: Dict[str, Any],
|
||||
) -> None:
|
||||
) -> bool:
|
||||
if not extra.get(C.KEY_DECRYPT, True):
|
||||
return
|
||||
return True
|
||||
if service is None:
|
||||
service = client.jid.userhostJID()
|
||||
shared_secrets = None
|
||||
|
|
@ -719,7 +719,7 @@ class PubsubEncryption:
|
|||
log.warning(
|
||||
f"No known shared secret for {node_uri}, can't decrypt"
|
||||
)
|
||||
return
|
||||
return True
|
||||
try:
|
||||
shared_secret = shared_secrets[secret_id]
|
||||
except KeyError:
|
||||
|
|
@ -737,6 +737,7 @@ class PubsubEncryption:
|
|||
item.children.clear()
|
||||
item.addChild(decrypted_elt)
|
||||
extra.setdefault("encrypted", {})[item["id"]] = {"type": NS_OXPS}
|
||||
return True
|
||||
|
||||
async def _message_received_trigger(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Reference in a new issue