don't show notifications from self
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
parent
a818dd4a2a
commit
fea2b9a9af
|
@ -94,11 +94,14 @@
|
||||||
:message description}))
|
:message description}))
|
||||||
|
|
||||||
(defn show-message-pn?
|
(defn show-message-pn?
|
||||||
[{{:keys [app-state]} :db :as cofx}
|
[{{:keys [app-state multiaccount]} :db :as cofx}
|
||||||
notification]
|
notification]
|
||||||
(let [chat-id (get-in notification [:body :chat :id])]
|
(let [chat-id (get-in notification [:body :chat :id])
|
||||||
(or (= app-state "background")
|
notification-author (get-in notification [:notificationAuthor :id])]
|
||||||
(not (chat.models/foreground-chat? cofx chat-id)))))
|
(and
|
||||||
|
(not= notification-author (:public-key multiaccount))
|
||||||
|
(or (= app-state "background")
|
||||||
|
(not (chat.models/foreground-chat? cofx chat-id))))))
|
||||||
|
|
||||||
(defn create-notification
|
(defn create-notification
|
||||||
([notification]
|
([notification]
|
||||||
|
|
Loading…
Reference in New Issue