diff --git a/src/status_im/data_store/chats.cljs b/src/status_im/data_store/chats.cljs index ddd021052e..3f097f310e 100644 --- a/src/status_im/data_store/chats.cljs +++ b/src/status_im/data_store/chats.cljs @@ -73,15 +73,15 @@ (dissoc :members))) (defn <-rpc-js [^js chat] - (-> {:name (.-name chat) - :description (.-description chat) - :color (.-color chat) - :emoji (.-emoji chat) - :timestamp (.-timestamp chat) - :alias (.-alias chat) - :identicon (.-identicon chat) - :muted (.-muted chat) - :joined (.-joined chat) + (-> {:name (.-name chat) + :description (.-description chat) + :color (.-color chat) + :emoji (.-emoji chat) + :timestamp (.-timestamp chat) + :alias (.-alias chat) + :identicon (.-identicon chat) + :muted (.-muted chat) + :joined (.-joined chat) :chat-id (.-id chat) :community-id (.-communityId chat) @@ -98,7 +98,8 @@ :last-clock-value (.-lastClockValue chat) :profile-public-key (.-profile chat) :highlight (.-highlight chat) - :active (.-active chat)} + :active (.-active chat) + :members (types/js->clj (.-members chat))} rpc->type unmarshal-members)) diff --git a/src/status_im/group_chats/db.cljs b/src/status_im/group_chats/db.cljs index 4d9bc85497..8d7a607f17 100644 --- a/src/status_im/group_chats/db.cljs +++ b/src/status_im/group_chats/db.cljs @@ -3,8 +3,9 @@ (def members-added-type 3) (defn member? - [public-key {:keys [contacts]}] - (contains? contacts public-key)) + [public-key {:keys [members contacts users]}] + (let [members-list (into #{} (concat (keys users) contacts (map #(:id %) members)))] + (contains? members-list public-key))) (defn invited? [my-public-key {:keys [contacts]}] diff --git a/src/status_im/ui/screens/home/views/inner_item.cljs b/src/status_im/ui/screens/home/views/inner_item.cljs index 41f3c2eab3..ca51de8b82 100644 --- a/src/status_im/ui/screens/home/views/inner_item.cljs +++ b/src/status_im/ui/screens/home/views/inner_item.cljs @@ -204,8 +204,11 @@ (first @(re-frame/subscribe [:contacts/contact-two-names-by-identity chat-id])))]) (defn home-list-item [home-item opts] - (let [{:keys [chat-id chat-name color group-chat muted emoji highlight edit? public? unviewed-messages-count contacts]} home-item - background-color (when highlight (colors/get-color :interactive-02))] + (let [{:keys [chat-id chat-name color group-chat muted emoji highlight edit? public? unviewed-messages-count contacts users members]} home-item + background-color (when highlight (colors/get-color :interactive-02)) + group-members-public-keys (->> (concat (keys users) contacts (map #(:id %) members)) + (into #{}) + (remove nil?))] [react/touchable-opacity (merge {:style {:height 64 :background-color background-color}} opts) [:<> (when (pos? unviewed-messages-count) @@ -245,7 +248,7 @@ :margin-right 4}}] [quo2.text/text {:weight :medium :style {:color (quo2.colors/theme-colors quo2.colors/neutral-50 quo2.colors/neutral-40)}} - (i18n/label :t/members-count {:count (count contacts)})]] + (i18n/label :t/members-count {:count (count group-members-public-keys)})]] [quo2.text/text {:monospace true :weight :medium :style {:color (quo2.colors/theme-colors quo2.colors/neutral-50 quo2.colors/neutral-40)} diff --git a/status-go-version.json b/status-go-version.json index 944dbd09d2..00537c7357 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": "659ab120b66dca9521c93cbd8516582634059074", - "commit-sha1": "659ab120b66dca9521c93cbd8516582634059074", - "src-sha256": "1x5pasyf4ivrw92pil4ljl6cfw3g6wn4drgxxszcdzih0pwzggx4" + "version": "bfab85f73bfa727db5b6e8078f9ce9ec191161ca", + "commit-sha1": "bfab85f73bfa727db5b6e8078f9ce9ec191161ca", + "src-sha256": "184zcv531cgwdg7zr7ryav7w9qwd90jgqb9nmmhy4l2pmcm1mlc9" }