mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
Small fixes
This commit is contained in:
parent
c3332be96a
commit
5e1df84f3a
@ -14,7 +14,7 @@
|
||||
$: content = parseContent({content: truncate ? ellipsize(about, 140) : about})
|
||||
</script>
|
||||
|
||||
<p>
|
||||
<p class="overflow-hidden text-ellipsis">
|
||||
{#each content as { type, value }}
|
||||
{#if type === "newline"}
|
||||
{#each value as _}
|
||||
|
@ -37,8 +37,6 @@ export const saveRelayPolicy = (e, relays: RelayPolicy[]) => {
|
||||
}
|
||||
|
||||
export const publishRelays = ($relays: RelayPolicy[]) => {
|
||||
updateStore(people.key(stateKey.get()), now(), {relays: $relays})
|
||||
|
||||
if (canSign.get()) {
|
||||
return createAndPublish(10002, {
|
||||
tags: $relays
|
||||
@ -54,6 +52,8 @@ export const publishRelays = ($relays: RelayPolicy[]) => {
|
||||
})
|
||||
.concat(getClientTags()),
|
||||
})
|
||||
} else {
|
||||
updateStore(people.key(stateKey.get()), now(), {relays: $relays})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {join} from "ramda"
|
||||
import {nip44} from "nostr-tools"
|
||||
import {cached} from "paravel"
|
||||
import {switcherFn} from "hurdak"
|
||||
import {switcherFn, tryFunc} from "hurdak"
|
||||
import type {Session} from "src/engine/session/model"
|
||||
import type {Connect} from "./connect"
|
||||
import {withExtension} from "./nip07"
|
||||
@ -36,7 +36,7 @@ export class Nip44 {
|
||||
}
|
||||
|
||||
decrypt(payload: string, pk: string, sk: string) {
|
||||
return nip44.v2.decrypt(payload, getSharedSecret(sk, pk))
|
||||
return tryFunc(() => nip44.v2.decrypt(payload, getSharedSecret(sk, pk)))
|
||||
}
|
||||
|
||||
encryptAsUser(message: string, pk: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user