1
0
mirror of https://git.pleroma.social/sjw/pleroma-fe.git synced 2024-12-24 14:05:06 +01:00

Do not show desktop notifications for your own chat messages

This commit is contained in:
eugenijm 2020-09-04 23:11:10 +03:00
parent a73b09c732
commit b8afdb4c02

View File

@ -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,