Skip to content

Commit

Permalink
fix: 🐛 Fixed broken notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Feb 7, 2023
1 parent 2a5353d commit cbc8ab8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/chat-api/events/userEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function onNotificationDismissed(payload: {channelId: string}) {
const mentions = useMention();
const channel = channels.get(payload.channelId);
batch(() => {
channel?.updateLastSeen(Date.now());
channel?.updateLastSeen(channel.lastMessagedAt);
mentions.remove(payload.channelId);
})

Expand Down
2 changes: 1 addition & 1 deletion src/chat-api/store/useMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const sendAndStoreMessage = async (channelId: string, content: string) => {
});


channel?.updateLastSeen(Date.now());
channel?.updateLastSeen(message?.createdAt!);
channel?.updateLastMessaged?.(message?.createdAt!);

const index = messages[channelId]?.findIndex(m => m.tempId === tempMessageId);
Expand Down

0 comments on commit cbc8ab8

Please sign in to comment.