i forgot whatever i've been doing, i think i added an inbox
This commit is contained in:
1 parent
ef037349f0
commit
04704749b7
24 files changed
+307
-86
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user