[#12332] Redirect to community chat on pressing PN

This commit is contained in:
Roman Volosovskyi 2021-08-25 11:44:44 +03:00
parent 8c493510a4
commit 2f0e0af1a1
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,7 @@
["p/" :chat-id] :private-chat ["p/" :chat-id] :private-chat
["cr/" :community-id] :community-requests ["cr/" :community-id] :community-requests
["c/" :community-id] :community ["c/" :community-id] :community
["cc/" :chat-id] :community-chat
"g/" group-chat-extractor "g/" group-chat-extractor
["wallet/" :account] :wallet-account ["wallet/" :account] :wallet-account
["u/" :user-id] :user ["u/" :user-id] :user
@ -216,6 +217,9 @@
(= handler :community) (= handler :community)
(cb {:type handler :community-id (:community-id route-params)}) (cb {:type handler :community-id (:community-id route-params)})
(= handler :community-chat)
(cb {:type handler :chat-id (:chat-id route-params)})
(= handler :referrals) (= handler :referrals)
(cb (match-referral route-params)) (cb (match-referral route-params))

View File

@ -69,6 +69,10 @@
(log/info "universal-links: handling community" community-id) (log/info "universal-links: handling community" community-id)
(navigation/navigate-to-cofx cofx :community {:community-id community-id})) (navigation/navigate-to-cofx cofx :community {:community-id community-id}))
(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))
(fx/defn handle-public-chat [cofx {:keys [topic]}] (fx/defn handle-public-chat [cofx {:keys [topic]}]
(log/info "universal-links: handling public chat" topic) (log/info "universal-links: handling public chat" topic)
(when (seq topic) (when (seq topic)
@ -127,6 +131,7 @@
:private-chat (handle-private-chat cofx data) :private-chat (handle-private-chat cofx data)
:community-requests (handle-community-requests cofx data) :community-requests (handle-community-requests cofx data)
:community (handle-community cofx data) :community (handle-community cofx data)
:community-chat (handle-community-chat cofx data)
:contact (handle-view-profile cofx data) :contact (handle-view-profile cofx data)
:browser (handle-browse cofx data) :browser (handle-browse cofx data)
:eip681 (handle-eip681 cofx data) :eip681 (handle-eip681 cofx data)