mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-09-30 00:41:09 +00:00
Remove zappers from people list in a thread
This commit is contained in:
parent
c7e066121b
commit
d06c74f466
@ -226,7 +226,6 @@ export const ThreadProvider = (props: { children: ContextChildren }) => {
|
||||
if (content.kind === Kind.EventZapInfo) {
|
||||
const zapInfo = JSON.parse(content.content) as TopZap;
|
||||
|
||||
|
||||
if (store.topZaps[zapInfo.event_id] === undefined) {
|
||||
updateStore('topZaps', () => ({ [zapInfo.event_id]: [{ ...zapInfo }]}));
|
||||
return;
|
||||
|
@ -90,7 +90,14 @@ const Thread: Component = () => {
|
||||
) || [];
|
||||
};
|
||||
|
||||
const people = () => threadContext?.users || [];
|
||||
const people = () => {
|
||||
const authors = (threadContext?.notes || []).map(n => n.user);
|
||||
const mentions = Object.values(primaryNote()?.mentionedUsers || {}).
|
||||
filter((u) => !authors.find(a => u.pubkey === a.pubkey));
|
||||
|
||||
return [ ...authors, ...mentions ];
|
||||
};
|
||||
|
||||
const isFetching = () => threadContext?.isFetching;
|
||||
|
||||
createEffect(() => {
|
||||
|
2
src/types/primal.d.ts
vendored
2
src/types/primal.d.ts
vendored
@ -218,7 +218,7 @@ export type NostrZapInfo = {
|
||||
kind: Kind.EventZapInfo,
|
||||
content: string,
|
||||
created_at?: number,
|
||||
tags: string[][],
|
||||
tags?: string[][],
|
||||
};
|
||||
|
||||
export type NostrEventContent =
|
||||
|
Loading…
Reference in New Issue
Block a user