From b948a44eb7292d33f6ddd811f86831e5fe14b024 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:28:24 +0700 Subject: [PATCH] change --- .../simplex/common/views/chat/item/ChatItemView.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt index 7c77893082..5c184c659a 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/ChatItemView.kt @@ -1020,14 +1020,12 @@ private fun BlockMemberAction( blockForAllAlert(rhId, gInfo = groupInfo, mem = member, blockMember = { withBGApi { try { - blockMemberForAll( - rhId, - gInfo = groupInfo, - member = member, - blocked = true - ) + blockMemberForAll(rhId, groupInfo, member, true) val reportId = cItem.id - deleteMessage(reportId, CIDeleteMode.cidmInternalMark) + val moderated = deleteMessage(reportedMessageId, CIDeleteMode.cidmBroadcast) + if (moderated != null) { + deleteMessage(reportId, CIDeleteMode.cidmInternalMark) + } } catch (ex: Exception) { Log.e(TAG, "BlockMemberAction block and moderate ${ex.message}") }