From abd689cfd3f9d654c9d222b782e7e2d6fbd59a12 Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:49:45 +1100 Subject: [PATCH] Check if a groupv2 conversation is admin --- .../securesms/conversation/v2/ConversationViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt index bafb5a7bdd..b5fafd8d08 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt @@ -91,8 +91,7 @@ class ConversationViewModel( _isAdmin.value = when(conversationType) { // for Groups V2 MessageType.GROUPS_V2 -> { - //todo GROUPS V2 add logic where code is commented to determine if user is an admin - false // FANCHAO - properly set up admin for groups v2 here + configFactory.getGroup(AccountId(conversation.address.serialize()))?.hasAdminKey() == true } // for legacy groups, check if the user created the group