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

View file

@ -425,7 +425,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
}
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
// Message sent by the current user can always be redacted
if (event.root.senderId == session.myUserId) return true