Add util to derive repository store, modify tracker to track relays by id

This commit is contained in:
Jon Staab
2024-10-10 13:10:50 -07:00
parent b8f4b29bb1
commit b5809b6f72
5 changed files with 50 additions and 23 deletions
+9 -1
View File
@@ -17,7 +17,15 @@ export const ensurePlaintext = async (e: TrustedEvent) => {
const $signer = getSigner(getSession(e.pubkey))
if ($signer) {
const result = await decrypt($signer, e.pubkey, e.content)
let result
try {
result = await decrypt($signer, e.pubkey, e.content)
} catch (e: any) {
if (!String(e).match(/invalid base64/)) {
throw e
}
}
if (result) {
setPlaintext(e, result)