Disable group chats even in dev mode. Closes #4506

This commit is contained in:
Pedro Pombeiro 2018-05-29 18:11:36 +02:00 committed by Roman Volosovskyi
parent 435b2271fd
commit d3202dffa7
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
3 changed files with 9 additions and 13 deletions

View File

@ -27,10 +27,12 @@
transport.utils/to-utf8 transport.utils/to-utf8
transit/deserialize)] transit/deserialize)]
(when (and sig status-message) (when (and sig status-message)
(handlers-macro/merge-fx (try
(assoc cofx :js-obj js-message) (handlers-macro/merge-fx
(message/receive status-message (or chat-id sig) sig) (assoc cofx :js-obj js-message)
(update-last-received-from-inbox now-in-s timestamp ttl))))) (message/receive status-message (or chat-id sig) sig)
(update-last-received-from-inbox now-in-s timestamp ttl))
(catch :default e nil))))) ; ignore unknown message types
(defn- js-array->seq [array] (defn- js-array->seq [array]
(for [i (range (.-length array))] (for [i (range (.-length array))]

View File

@ -103,13 +103,7 @@
"c5" (fn [message-ids] "c5" (fn [message-ids]
(v1.protocol/MessagesSeen. message-ids)) (v1.protocol/MessagesSeen. message-ids))
"c6" (fn [[name profile-image]] "c6" (fn [[name profile-image]]
(v1.contact/ContactUpdate. name profile-image)) (v1.contact/ContactUpdate. name profile-image))}})) ; removed group chat handlers for https://github.com/status-im/status-react/issues/4506
"g1" (fn [[chat-id sym-key message]]
(v1.group-chat/NewGroupKey. chat-id sym-key message))
"g2" (fn [[chat-name participants]]
(v1.group-chat/GroupAdminUpdate. chat-name participants))
"g3" (fn [_]
(v1.group-chat/GroupLeave.))}}))
(defn serialize (defn serialize
"Serializes a record implementing the StatusMessage protocol using the custom writers" "Serializes a record implementing the StatusMessage protocol using the custom writers"

View File

@ -13,7 +13,7 @@
[status-im.ui.components.status-bar.view :as status-bar] [status-im.ui.components.status-bar.view :as status-bar]
[status-im.ui.components.toolbar.view :as toolbar])) [status-im.ui.components.toolbar.view :as toolbar]))
(defn- options-list [{:keys [address dev-mode?]}] (defn- options-list [{:keys [address]}]
[react/view action-button.styles/actions-list [react/view action-button.styles/actions-list
[action-button/action-button [action-button/action-button
{:label (i18n/label :t/start-new-chat) {:label (i18n/label :t/start-new-chat)
@ -23,7 +23,7 @@
:on-press #(re-frame/dispatch [:navigate-to :new-chat])}] :on-press #(re-frame/dispatch [:navigate-to :new-chat])}]
[action-button/action-separator] [action-button/action-separator]
;; Hide behind flag (false by default), till everything is fixed in group chats ;; Hide behind flag (false by default), till everything is fixed in group chats
(when (or config/group-chats-enabled? dev-mode?) (when config/group-chats-enabled?
[action-button/action-button [action-button/action-button
{:label (i18n/label :t/start-group-chat) {:label (i18n/label :t/start-group-chat)
:accessibility-label :start-group-chat-button :accessibility-label :start-group-chat-button