From 813d96df106bd59649de0ff10393742744e8cbfe Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Wed, 20 Mar 2024 11:42:19 +0000 Subject: [PATCH] fix can post https://github.com/status-im/status-go/compare/f69ee075...894eb575 --- src/legacy/status_im/data_store/communities.cljs | 5 +++-- src/status_im/subs/communities.cljs | 13 +++++++++++-- status-go-version.json | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/legacy/status_im/data_store/communities.cljs b/src/legacy/status_im/data_store/communities.cljs index 757788a336..32dfb5a113 100644 --- a/src/legacy/status_im/data_store/communities.cljs +++ b/src/legacy/status_im/data_store/communities.cljs @@ -28,8 +28,9 @@ (name k) (-> v (assoc :token-gated? (:tokenGated v) - :can-post? (:canPost v)) - (dissoc :canPost :tokenGated) + :can-post? (:canPost v) + :can-view? (:canView v)) + (dissoc :canPost :tokenGated :canView) (update :members walk/stringify-keys)))) {} chats)) diff --git a/src/status_im/subs/communities.cljs b/src/status_im/subs/communities.cljs index dc8fe91a99..9fcabd1034 100644 --- a/src/status_im/subs/communities.cljs +++ b/src/status_im/subs/communities.cljs @@ -235,7 +235,15 @@ collapsed-categories full-chats-data] (fn [acc - [_ {:keys [name categoryID position id emoji can-post? token-gated?]}]] + [_ + {:keys [name + categoryID + position + id + emoji + can-view? + can-post? + token-gated?]}]] (let [category-id (if (seq categoryID) categoryID constants/empty-category-id) {:keys [unviewed-messages-count unviewed-mentions-count @@ -261,7 +269,8 @@ ;; NOTE: this is a troolean nil->no permissions, true->no access, false -> ;; has access :locked? (when token-gated? - (not can-post?)) + (and (not can-view?) + (not can-post?))) :id id}] (update-in acc-with-category [category-id :chats] conj categorized-chat)))) diff --git a/status-go-version.json b/status-go-version.json index dc29361e86..9123cbda77 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.176.10", - "commit-sha1": "f69ee07593e8e35bb029f62de670b5554d71c932", - "src-sha256": "1icm7l1lhqdz5zbfvagxb051rw3hdm8zvwcxwaizyd1lhbx4v8h5" + "version": "v0.177.0", + "commit-sha1": "894eb5758e8ff8f449312f92149f8698058d0fbb", + "src-sha256": "1q0l7ndm6s4kai6zn86mka5fxk2hl60qhlhfy9wh9lrl6a62r15p" }