Add step to confirm decrypt before doing it in the background

This commit is contained in:
Jon Staab
2024-11-19 10:11:31 -08:00
parent 7cc2a2f264
commit e5fd172994
4 changed files with 83 additions and 4 deletions
+5
View File
@@ -55,6 +55,7 @@
getMembershipRooms,
userMembership,
ensureUnwrapped,
canDecrypt,
MESSAGE,
COMMENT,
THREAD,
@@ -171,6 +172,10 @@
unwrapper.addGlobalHandler(ensureUnwrapped)
repository.on("update", ({added}) => {
if (!$canDecrypt) {
return
}
for (const event of added) {
if (event.kind === WRAP) {
unwrapper.push(event)