Fix Error when opening 1-1 chat in Activity center for blocked user

Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
Brian Sztamfater 2021-07-29 18:07:51 -03:00
parent 18e6ceaab1
commit e5477cd449
No known key found for this signature in database
GPG Key ID: 59EB921E0706B48F

View File

@ -1802,12 +1802,15 @@
(re-frame/reg-sub
:activity.center/notifications-grouped-by-date
:<- [:activity.center/notifications]
(fn [{:keys [notifications]}]
(let [supported-notifications (filter (fn [{:keys [type]}]
(or (= constants/activity-center-notification-type-mention type)
(= constants/activity-center-notification-type-one-to-one-chat type)
(= constants/activity-center-notification-type-private-group-chat type)
(= constants/activity-center-notification-type-reply type))) notifications)]
:<- [::chats]
(fn [[{:keys [notifications]} chats]]
(let [supported-notifications (filter (fn [{:keys [type chat-id]}]
(and
(or (= constants/activity-center-notification-type-mention type)
(= constants/activity-center-notification-type-one-to-one-chat type)
(= constants/activity-center-notification-type-private-group-chat type)
(= constants/activity-center-notification-type-reply type))
(get chats chat-id))) notifications)]
(group-notifications-by-date (map #(assoc % :timestamp (or (:timestamp %) (:timestamp (or (:message %) (:last-message %))))) supported-notifications)))))
;;WALLET TRANSACTIONS ==================================================================================================