refer to nip 17 rather than 44

This commit is contained in:
Jon Staab 2024-06-21 13:46:35 -07:00
parent 4708dc3013
commit 01e6c663fb
3 changed files with 11 additions and 13 deletions

View File

@ -37,9 +37,9 @@
const getContent = e => (e.kind === 4 ? ensureMessagePlaintext(e) : e.content) || ""
const send = async (content, useNip44) => {
const send = async (content, useNip17) => {
// If we don't have nip44 support, just send a legacy message
if (!$nip44.isEnabled() || !useNip44) {
if (!$nip44.isEnabled() || !useNip17) {
return sendLegacyMessage(channelId, content)
}

View File

@ -6,8 +6,7 @@
export let topic
const topics = ["web-of-trust", "nip-44-dms"]
const nip44Url = "https://github.com/nostr-protocol/nips/blob/master/44.md"
const topics = ["web-of-trust", "nip-17-dms"]
const nip17Url = "https://github.com/nostr-protocol/nips/blob/master/17.md"
</script>
@ -29,11 +28,10 @@
You can set a minimum web of trust score on your content settings page, which will
automatically mute anyone with a lower score than your threshold.
</p>
{:else if topic === "nip-44-dms"}
{:else if topic === "nip-17-dms"}
<p>
<Anchor underline external href={nip44Url}>NIP 44</Anchor> is a new encryption standard for nostr,
which along with <Anchor underline external href={nip17Url}>NIP 17</Anchor> improves upon the old
NIP 04 direct messages standard by adding support for group chats and better metadata hiding.
<Anchor underline external href={nip17Url}>NIP 17</Anchor> improves upon the old NIP 04 direct
messages standard by adding support for group chats and better metadata hiding.
</p>
<p>
In the past, a significant amount of information about private messages was public, event

View File

@ -34,7 +34,7 @@
let limit = 10
let showNewMessages = false
let groupedMessages = []
let useNip44 =
let useNip17 =
pubkeys.length > 2 ||
($nip44.isEnabled() &&
repository.query([{kinds: [INBOX_RELAYS], authors: pubkeys}]).length === pubkeys.length)
@ -78,7 +78,7 @@
if (content) {
textarea.value = ""
await sendMessage(content, useNip44)
await sendMessage(content, useNip17)
stickToBottom()
}
@ -161,18 +161,18 @@
</div>
{#if $nip44.isEnabled()}
<div class="fixed bottom-0 right-12 flex items-center justify-end gap-2 p-2">
<Toggle scale={0.7} bind:value={useNip44} />
<Toggle scale={0.7} bind:value={useNip17} />
<small>
Send messages using
<Popover class="inline">
<span slot="trigger" class="cursor-pointer underline">NIP 44</span>
<span slot="trigger" class="cursor-pointer underline">NIP 17</span>
<div slot="tooltip" class="flex flex-col gap-2">
<p>
When enabled, Coracle will use nostr's new group chat specification, which solves
several problems with legacy DMs. Read more <Anchor
underline
modal
href="/help/nip-44-dms">here</Anchor
href="/help/nip-17-dms">here</Anchor
>.
</p>
<p>