add user page

This commit is contained in:
Ren Amamiya
2023-06-20 13:48:08 +07:00
parent 9b84068e6d
commit b1cecbbc07
7 changed files with 216 additions and 112 deletions

View File

@@ -24,7 +24,7 @@ export function ActiveAccount({ data }: { data: any }) {
// subscribe to channel
const sub = ndk.subscribe(
{
kinds: [4, 42],
kinds: [1, 4, 42],
"#p": [data.pubkey],
since: since,
},
@@ -35,6 +35,10 @@ export function ActiveAccount({ data }: { data: any }) {
sub.addListener("event", (event) => {
switch (event.kind) {
case 1:
// send native notifiation
sendNativeNotification("Someone mention you");
break;
case 4:
// save
saveChat(data.pubkey, event);