Skip to content
Snippets Groups Projects
Commit 8a0f280c authored by Shpuld Shpludson's avatar Shpuld Shpludson
Browse files

Merge branch 'chat-desktop-notifications-fix' into 'develop'

Do not show desktop notifications for your own chat messages

Closes #951

See merge request !1225
parents a73b09c7 b8afdb4c
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import { showDesktopNotification } from '../desktop_notification_utils/desktop_n
export const maybeShowChatNotification = (store, chat) => {
if (!chat.lastMessage) return
if (store.rootState.chats.currentChatId === chat.id && !document.hidden) return
if (store.rootState.users.currentUser.id === chat.lastMessage.account.id) return
const opts = {
tag: chat.lastMessage.id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment