mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 02:04:28 +00:00
Dont push notification if chat is not in cofx
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
aee782d468
commit
49b78c0cea
@ -42,6 +42,7 @@
|
||||
[{:keys [title message icon user-info channel-id type]
|
||||
:as notification
|
||||
:or {channel-id "status-im-notifications"}}]
|
||||
(when notification
|
||||
(pn-android/present-local-notification
|
||||
(merge {:channelId channel-id
|
||||
:title title
|
||||
@ -52,7 +53,7 @@
|
||||
(when icon
|
||||
{:largeIconUrl (:uri (react/resolve-asset-source icon))})
|
||||
(when (= type "message")
|
||||
notification))))
|
||||
notification)))))
|
||||
|
||||
(defn handle-notification-press [{{deep-link :deepLink} :userInfo
|
||||
interaction :userInteraction}]
|
||||
@ -136,6 +137,7 @@
|
||||
{:keys [chat-type chat-id] :as chat} :chat
|
||||
{:keys [identicon]} :contact
|
||||
contact-id :contact-id}]
|
||||
(when (and chat-type chat-id)
|
||||
(let [contact-name @(re-frame/subscribe
|
||||
[:contacts/contact-name-by-identity contact-id])
|
||||
group-chat? (not= chat-type constants/one-to-one-chat-type)
|
||||
@ -161,7 +163,7 @@
|
||||
:alias title
|
||||
:identicon (or identicon (identicon/identicon contact-id))
|
||||
:whisperTimestamp (get message :whisperTimestamp)
|
||||
:text (reply/get-quoted-text-with-mentions (:parsedText message))})))
|
||||
:text (reply/get-quoted-text-with-mentions (:parsedText message))}))))
|
||||
|
||||
(defn create-notification
|
||||
([notification]
|
||||
|
Loading…
x
Reference in New Issue
Block a user