Update vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt

This commit is contained in:
Benoit Marty 2021-04-30 11:56:45 +02:00 committed by GitHub
parent 6180076512
commit 589be8b15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
} }
private fun canRedact(event: TimelineEvent, actionPermissions: ActionPermissions): Boolean { private fun canRedact(event: TimelineEvent, actionPermissions: ActionPermissions): Boolean {
// Only event of type EventType.MESSAGE are supported for the moment // Only event of type EventType.MESSAGE or EventType.STICKER are supported for the moment
if (event.root.getClearType() !in listOf(EventType.MESSAGE, EventType.STICKER)) return false if (event.root.getClearType() !in listOf(EventType.MESSAGE, EventType.STICKER)) return false
// Message sent by the current user can always be redacted // Message sent by the current user can always be redacted
if (event.root.senderId == session.myUserId) return true if (event.root.senderId == session.myUserId) return true