i forgot whatever i've been doing, i think i added an inbox

This commit is contained in:
Xyphyn committed 2023-07-04 18:45:15 -07:00
1 parent ef037349f0
commit 04704749b7
24 files changed
+307 -86

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import type {
CommentReplyView,
PersonMentionView,
PrivateMessageView,
} from 'lemmy-js-client'
export type InboxItemView =
| PersonMentionView
| CommentReplyView
| PrivateMessageView
export function getInboxItemPublished(item: InboxItemView): string {
if ('comment_reply' in item) {
return item.comment_reply.published
}
if ('private_message' in item) {
return item.private_message.published
}
return item.person_mention.published
}