From de5c23d39fac515453987d5c47ea9bdcf9c2f96d Mon Sep 17 00:00:00 2001 From: tbenr Date: Sat, 2 Mar 2019 15:06:06 +0100 Subject: [PATCH] fixes #7353 Signed-off-by: Julien Eluard --- src/status_im/extensions/core.cljs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/status_im/extensions/core.cljs b/src/status_im/extensions/core.cljs index 54735945aa..19f314a2f1 100644 --- a/src/status_im/extensions/core.cljs +++ b/src/status_im/extensions/core.cljs @@ -296,6 +296,11 @@ (when-let [command (last (first (filter #(= (ffirst %) (name hook-id)) (:id->command db))))] (commands-sending/send cofx current-chat-id command params))))) +(handlers/register-handler-fx + :extensions.chat.command/open-public-chat + (fn [_ [_ _ {:keys [topic navigate-to]}]] + {:dispatch [:chat.ui/start-public-chat topic {:dont-navigate? (not navigate-to) :navigation-reset? true}]})) + (handlers/register-handler-fx :extensions/show-selection-screen (fn [cofx [_ _ {:keys [on-select] :as params}]] @@ -486,6 +491,10 @@ {:permissions [:read] :value :extensions.chat.command/send-message :arguments {:params :map}} + 'chat.command/open-public-chat + {:permissions [:read] + :value :extensions.chat.command/open-public-chat + :arguments {:topic :string :navigate-to :boolean}} 'log {:permissions [:read] :value :log