mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-09 08:14:28 +01:00
Filter self from social row
This commit is contained in:
committed by
Paul Miller
parent
16d60aa115
commit
14363355e2
@@ -16,13 +16,15 @@ export function SocialActionRow(props: {
|
||||
const getContacts = cache(async () => {
|
||||
try {
|
||||
const contacts: TagItem[] = (await sw.get_contacts_sorted()) || [];
|
||||
const myNpub = (await sw.get_npub()) || "";
|
||||
|
||||
// contact must have a npub, ln_address, or lnurl
|
||||
return contacts.filter(
|
||||
(contact) =>
|
||||
contact.npub !== undefined ||
|
||||
contact.ln_address !== undefined ||
|
||||
contact.lnurl !== undefined
|
||||
(contact.npub !== undefined ||
|
||||
contact.ln_address !== undefined ||
|
||||
contact.lnurl !== undefined) &&
|
||||
contact.npub !== myNpub
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user