android, desktop: offer key verification when member profile is opened from chat (#7486)

In channels members are usually connected via relays, so they are memberCurrent
but not memberActive, and #7255 widened the condition for requesting the member
security code to cover them. It updated GroupChatInfoView and
MemberSupportChatView, but not the same code in ChatView, so "Verify security
code" is not offered when the profile is opened by tapping member avatar in the
chat, while it is offered for the same member in the members list.
This commit is contained in:
Narasimha-sc
2026-09-19 08:13:05 +01:00
committed by GitHub
parent c8466b2010
commit 6f85f1d4f0
@@ -502,7 +502,7 @@ fun ChatView(
groupMembersJob = scope.launch(Dispatchers.Default) {
val r = chatModel.controller.apiGroupMemberInfo(chatRh, groupInfo.groupId, member.groupMemberId)
val stats = r?.second
val (updatedMember, code) = if (member.memberActive) {
val (updatedMember, code) = if ((member.memberActive || (groupInfo.useRelays && member.memberCurrent)) && member.memberRole != GroupMemberRole.Relay) {
val memCode = chatModel.controller.apiGetGroupMemberCode(chatRh, groupInfo.apiId, member.groupMemberId)
(memCode?.first ?: r?.first ?: member) to memCode?.second
} else {