File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ POW_TIME=1
88DEFAULT_NETWORK=testnet_rpc
99DEBUG_WEBVIEW=1
1010GROUP_CHATS_ENABLED=1
11+ PAIRING_ENABLED=1
1112EXTENSIONS=1
1213PFS_ENCRYPTION_ENABLED=0
1314ERC20_CONTRACT_WARNINGS=1
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ POW_TARGET=0.002
77POW_TIME=1
88DEFAULT_NETWORK=mainnet_rpc
99DEBUG_WEBVIEW=1
10- GROUP_CHATS_ENABLED=0
10+ PAIRING_ENABLED=1
11+ GROUP_CHATS_ENABLED=1
1112MAINNET_WARNING_ENABLED=1
1213EXTENSIONS=1
1314PFS_ENCRYPTION_ENABLED=0
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ POW_TARGET=0.002
99POW_TIME = 1
1010DEFAULT_NETWORK = mainnet_rpc
1111DEBUG_WEBVIEW = 0
12- GROUP_CHATS_ENABLED = 0
12+ GROUP_CHATS_ENABLED = 1
13+ PAIRING_ENABLED = 1
1314MAINNET_WARNING_ENABLED = 1
1415EXTENSIONS = 1
1516PFS_ENCRYPTION_ENABLED = 0
Original file line number Diff line number Diff line change 2525 ; ; not a group chat
2626 (or (not (and group-chat (not public?)))
2727 ; ; if it's a group chat
28- ( utils.config/group-chats-enabled? dev-mode?) ))
28+ utils.config/group-chats-enabled?))
2929 (assoc acc chat-id (if-let [contact (get contacts chat-id)]
3030 (-> chat
3131 (assoc :name (:name contact))
Original file line number Diff line number Diff line change 381381 membership-updates] :as membership-update}
382382 sender-signature]
383383 (let [dev-mode? (get-in cofx [:db :account/account :dev-mode? ])]
384- (when (and ( config/group-chats-enabled? dev-mode?)
384+ (when (and config/group-chats-enabled?
385385 (valid-chat-id? chat-id (extract-creator membership-update)))
386386 (let [previous-chat (get-in cofx [:db :chats chat-id])
387387 all-updates (clojure.set/union (set (:membership-updates previous-chat))
Original file line number Diff line number Diff line change 110110 ; ; We don't check dev-mode? here as
111111 ; ; otherwise we would have to restart the node
112112 ; ; when the user enables it
113- ( config/group-chats-enabled? true )
113+ config/group-chats-enabled?
114114 (config/pairing-enabled? true )))
115115
116116 (and
Original file line number Diff line number Diff line change 2323 :on-press #(re-frame/dispatch [:navigate-to :new-chat ])}]
2424 [action-button/action-separator]
2525 ; ; Hide behind flag (false by default), till everything is fixed in group chats
26- (when ( config/group-chats-enabled? dev-mode?)
26+ (when config/group-chats-enabled?
2727 [action-button/action-button
2828 {:label (i18n/label :t/start-group-chat )
2929 :accessibility-label :start-group-chat-button
3030 :icon :icons/contacts
3131 :icon-opts {:color colors/blue}
3232 :on-press #(re-frame/dispatch [:contact.ui/start-group-chat-pressed ])}])
33- (when ( config/group-chats-enabled? dev-mode?)
33+ (when config/group-chats-enabled?
3434 [action-button/action-separator])
3535 [action-button/action-button
3636 {:label (i18n/label :t/new-public-group-chat )
Original file line number Diff line number Diff line change 9292 [react/image {:style styles/suggested-contact-image
9393 :source {:uri (:photo-path c)}}]
9494 [react/text {:style styles/new-contact-subtitle} (:name c)]]]))]]
95- (when ( config/group-chats-enabled? true ) group-chat-section)
95+ (when config/group-chats-enabled? group-chat-section)
9696 ^{:key " publicchat" }
9797 [react/view {:style styles/new-contact-title}
9898 [react/text {:style styles/new-contact-title-text
Original file line number Diff line number Diff line change 1717
1818(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED " 1" )))
1919(def rpc-networks-only? (enabled? (get-config :RPC_NETWORKS_ONLY " 1" )))
20- (defn group-chats-enabled? [dev-mode?]
21- (and (enabled? (get-config :GROUP_CHATS_ENABLED " 0" ))
22- (or dev-mode? platform/desktop?)))
20+ (def group-chats-enabled? (enabled? (get-config :GROUP_CHATS_ENABLED " 0" )))
2321(defn pairing-enabled? [dev-mode?]
2422 (and (enabled? (get-config :PAIRING_ENABLED " 0" ))
2523 (or dev-mode? platform/desktop?)))
Original file line number Diff line number Diff line change 2929 (is (= 3 (group-chats/get-last-clock-value {:db {:chats {chat-id {:last-clock-value 3 }}}} chat-id))))
3030
3131(deftest handle-group-membership-update-test
32- (with-redefs [config/group-chats-enabled? ( constantly true ) ]
32+ (with-redefs [config/group-chats-enabled? true ]
3333 (testing " a brand new chat"
3434 (let [actual (->
3535 (group-chats/handle-membership-update {:now 0 :db {}} initial-message admin)
You can’t perform that action at this time.
0 commit comments