File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Sources/ChatroomUIKit/Classes/UI/Components/Room/Views Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments