fix "Remove from contacts" is available when the user is not your contact (#20541)

This commit is contained in:
Parvesh Monu 2024-06-25 13:48:53 +05:30 committed by GitHub
parent ead51b7e7c
commit 0ed39a42ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -448,7 +448,7 @@
(destructive-actions item inside-chat?)])])
(defn contact-actions
[{:keys [public-key] :as contact} {:keys [chat-id admin?] :as extra-data}]
[{:keys [public-key added?] :as contact} {:keys [chat-id admin?] :as extra-data}]
(let [current-pub-key (rf/sub [:multiaccount/public-key])]
[quo/action-drawer
[[(view-profile-entry public-key)
@ -459,7 +459,7 @@
[(when-not (= current-pub-key public-key)
(when config/show-not-implemented-features?
(mark-untrustworthy-entry)))
(when-not (= current-pub-key public-key) (remove-from-contacts-entry contact))
(when added? (remove-from-contacts-entry contact))
(when-not (= current-pub-key public-key) (block-user-entry contact))]
(when (and admin? chat-id)
[(if (= current-pub-key public-key)