+
+ Notes cannot be reliably deleted on nostr, but you can ask. Are you sure you want to delete this
+ note?
+
+
+
diff --git a/src/app/views/Onboarding.svelte b/src/app/views/Onboarding.svelte
index 91268efa..d135acbf 100644
--- a/src/app/views/Onboarding.svelte
+++ b/src/app/views/Onboarding.svelte
@@ -45,7 +45,7 @@
await Promise.all([
user.updateRelays(() => user.getRelays()),
cmd.updateUser(profile).publish(user.getRelays()),
- note && cmd.createNote(note.content, note.mentions, note.topics).publish(user.getRelays()),
+ note && cmd.createNote(note).publish(user.getRelays()),
user.updatePetnames(() =>
user.getPetnamePubkeys().map(pubkey => {
const [{url}] = sampleRelays(getPubkeyWriteRelays(pubkey))
diff --git a/src/partials/Compose.svelte b/src/partials/Compose.svelte
index 7a5e78b8..8c893ab9 100644
--- a/src/partials/Compose.svelte
+++ b/src/partials/Compose.svelte
@@ -203,20 +203,16 @@
export const parse = () => {
let {content, annotations} = contenteditable.parse()
- const topics = pluck("value", annotations.filter(propEq("prefix", "#")))
// Remove zero-width and non-breaking spaces
content = content.replace(/[\u200B\u00A0]/g, " ").trim()
- // We're still using old style mention interpolation until NIP-27
- // gets merged https://github.com/nostr-protocol/nips/pull/381/files
- const mentions = annotations.filter(propEq("prefix", "@")).map(({value}, index) => {
- content = content.replace("@" + value, `#[${index}]`)
-
- return pubkeyEncoder.decode(value)
+ // Strip the @ sign in mentions
+ annotations.filter(propEq("prefix", "@")).forEach(({value}, index) => {
+ content = content.replace("@" + value, value)
})
- return {content, topics, mentions}
+ return content
}
diff --git a/src/util/nostr.ts b/src/util/nostr.ts
index 7aefe46f..d3aeaa67 100644
--- a/src/util/nostr.ts
+++ b/src/util/nostr.ts
@@ -77,7 +77,9 @@ export class Tags {
}
export const findReplyAndRoot = e => {
- const tags = Tags.from(e).type("e")
+ const tags = Tags.from(e)
+ .type("e")
+ .filter(t => last(t) !== "mention")
const legacy = tags.any(t => !["reply", "root"].includes(last(t)))
// Support the deprecated version where tags are not marked as replies