feat: add nip46

This commit is contained in:
reya
2024-04-18 15:09:33 +07:00
parent cd31b99559
commit 89c36423ae
7 changed files with 189 additions and 65 deletions
+1 -6
View File
@@ -11,12 +11,7 @@ export function useProfile(pubkey: string) {
queryKey: ["user", pubkey],
queryFn: async () => {
try {
const id = pubkey
.replace("nostr:", "")
.split("'")[0]
.split(".")[0]
.split(",")[0]
.split("?")[0];
const id = pubkey.replace("nostr:", "").replace(/[^\w\s]/gi, "");
const cmd: Metadata = await invoke("get_profile", { id });
return cmd;
} catch (e) {