fix can post

f69ee075...894eb575
This commit is contained in:
Andrea Maria Piana 2024-03-20 11:42:19 +00:00
parent 6363756c09
commit 813d96df10
No known key found for this signature in database
3 changed files with 17 additions and 7 deletions

View File

@ -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))

View File

@ -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))))

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"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"
}