opening group/community chats clears related activity center entries

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
Michele Balistreri 2021-09-14 13:29:12 +03:00
parent a1ede3528f
commit 4f4651baac
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
2 changed files with 4 additions and 2 deletions

View File

@ -60,7 +60,8 @@
(fx/defn create-from-link
[cofx {:keys [chat-id invitation-admin chat-name]}]
(if (get-in cofx [:db :chats chat-id :is-active])
(models.chat/navigate-to-chat cofx chat-id false)
{:dispatch-n [[:accept-all-activity-center-notifications-from-chat chat-id]
[:chat.ui/navigate-to-chat chat-id false]]}
{::json-rpc/call [{:method (json-rpc/call-ext-method "createGroupChatFromInvitation")
:params [chat-name chat-id invitation-admin]
:js-response true

View File

@ -71,7 +71,8 @@
(fx/defn handle-community-chat [cofx {:keys [chat-id]}]
(log/info "universal-links: handling community chat" chat-id)
(chat/navigate-to-chat cofx chat-id true))
{:dispatch-n [[:accept-all-activity-center-notifications-from-chat chat-id]
[:chat.ui/navigate-to-chat chat-id true]]})
(fx/defn handle-public-chat [cofx {:keys [topic]}]
(log/info "universal-links: handling public chat" topic)