Skip to content

Commit f39f17a

Browse files
authored
Merge pull request #25 from easemob/dev
Dev
2 parents 1324e71 + fa0c63e commit f39f17a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/ChatroomUIKit/Classes/UI/Components/Room/Views/ChatroomView.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ extension ChatroomView: MessageListActionEventsHandler {
202202
if message.body.type == .custom {
203203
return
204204
}
205+
let currentUser = ChatroomContext.shared?.currentUser?.userId ?? ""
205206
var messageActions = [ActionSheetItemProtocol]()
206207
if let owner = ChatroomContext.shared?.owner,owner {
207208
messageActions.append(contentsOf: Appearance.defaultMessageActions)
@@ -245,7 +246,12 @@ extension ChatroomView: MessageListActionEventsHandler {
245246
messageActions.remove(at: index)
246247
}
247248
}
248-
let currentUser = ChatroomContext.shared?.currentUser?.userId ?? ""
249+
if currentUser == message.from {
250+
if let index = messageActions.firstIndex(where: { $0.tag == "Mute"
251+
}) {
252+
messageActions.remove(at: index)
253+
}
254+
}
249255
if message.from.lowercased() != currentUser.lowercased() {
250256
messageActions.removeAll { $0.tag == "Recall" }
251257
}

0 commit comments

Comments
 (0)