Fix mention suggestions

This commit is contained in:
Jon Staab
2025-01-28 12:26:19 -08:00
parent db2076135d
commit ac3408c119
11 changed files with 20 additions and 19 deletions
@@ -5,6 +5,7 @@ import tippy from "tippy.js"
import {nprofileEncode} from "nostr-tools/nip19"
// @ts-ignore
import type {Editor} from "svelte-tiptap"
import {makeNProfileAttrs} from 'nostr-editor'
import {PluginKey} from "@tiptap/pm/state"
import Suggestion from "@tiptap/suggestion"
import Suggestions from "../components/Suggestions.svelte"
@@ -137,9 +138,9 @@ export const MentionSuggestion = (options: MentionSuggestionOptions) =>
name: "nprofile",
select: (pubkey: string, props: any) => {
const relays = options.getRelays(pubkey)
const nprofile = nprofileEncode({pubkey, relays})
const bech32 = nprofileEncode({pubkey, relays})
return props.command({pubkey, relays, nprofile})
return props.command(makeNProfileAttrs(bech32, {}))
},
...options,
})