mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-01 00:19:45 +02:00
show article mentions in notifications
This commit is contained in:
parent
a6f9217349
commit
15ae01bccf
@ -27,10 +27,10 @@ export function getEventUID(event: NostrEvent) {
|
||||
}
|
||||
|
||||
export function isReply(event: NostrEvent | DraftNostrEvent) {
|
||||
return event.kind === 1 && !!getReferences(event).replyId;
|
||||
return !!getReferences(event).replyId;
|
||||
}
|
||||
export function isMentionedInContent(event: NostrEvent | DraftNostrEvent, pubkey: string) {
|
||||
return event.kind === 1 && filterTagsByContentRefs(event.content, event.tags).some((t) => t[1] === pubkey);
|
||||
return filterTagsByContentRefs(event.content, event.tags).some((t) => t[1] === pubkey);
|
||||
}
|
||||
|
||||
export function isRepost(event: NostrEvent | DraftNostrEvent) {
|
||||
|
@ -41,7 +41,7 @@ export default function NotificationTimelineProvider({ children }: PropsWithChil
|
||||
account?.pubkey
|
||||
? {
|
||||
"#p": [account.pubkey],
|
||||
kinds: [Kind.Text, Kind.Repost, Kind.Reaction, Kind.Zap, TORRENT_COMMENT_KIND],
|
||||
kinds: [Kind.Text, Kind.Repost, Kind.Reaction, Kind.Zap, TORRENT_COMMENT_KIND, Kind.Article],
|
||||
}
|
||||
: undefined,
|
||||
{ eventFilter },
|
||||
|
@ -97,7 +97,7 @@ export default function CommunityHomePage({ community }: { community: NostrEvent
|
||||
)}
|
||||
|
||||
<Flex gap="4" alignItems="flex-start" overflow="hidden">
|
||||
<Flex direction="column" gap="4" flex={1} overflow="hidden">
|
||||
<Flex direction="column" gap="4" flex={1} overflow="hidden" minH="full">
|
||||
<ButtonGroup size="sm">
|
||||
<Button
|
||||
colorScheme="primary"
|
||||
|
@ -181,6 +181,7 @@ const NotificationItem = ({ event }: { event: NostrEvent }) => {
|
||||
switch (event.kind) {
|
||||
case Kind.Text:
|
||||
case TORRENT_COMMENT_KIND:
|
||||
case Kind.Article:
|
||||
content = <NoteNotification event={event} ref={ref} />;
|
||||
break;
|
||||
case Kind.Reaction:
|
||||
|
Loading…
x
Reference in New Issue
Block a user