show article mentions in notifications

This commit is contained in:
hzrd149 2023-12-01 11:32:38 -06:00
parent a6f9217349
commit 15ae01bccf
4 changed files with 5 additions and 4 deletions

View File

@ -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) {

View File

@ -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 },

View File

@ -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"

View File

@ -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: