Skip to content

Commit

Permalink
fix: private messages cant be marked as read
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyphyn committed Oct 3, 2023
1 parent 52aba95 commit 366b1ef
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/routes/inbox/InboxItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,27 @@
loading = true
if (item.type == 'person_mention') {
await getClient().markPersonMentionAsRead({
person_mention_id: item.id,
read: isRead,
})
} else if (item.type == 'comment_reply') {
await getClient().markCommentReplyAsRead({
comment_reply_id: item.id,
read: isRead,
})
switch (item.type) {
case 'person_mention': {
await getClient().markPersonMentionAsRead({
person_mention_id: item.id,
read: isRead,
})
break
}
case 'comment_reply': {
await getClient().markCommentReplyAsRead({
comment_reply_id: item.id,
read: isRead,
})
break
}
case 'private_message': {
await getClient().markPrivateMessageAsRead({
private_message_id: item.id,
read: isRead,
})
}
}
item.read = isRead
Expand Down

0 comments on commit 366b1ef

Please sign in to comment.