Commit d9eff45b authored by Leonardo Aramaki's avatar Leonardo Aramaki

All user roles can see the reply button

parent ea8a8639
......@@ -120,12 +120,9 @@ class ViewModelMapper @Inject constructor(
private fun isBroadcastReplyAvailable(roomViewModel: RoomViewModel, message: Message): Boolean {
val senderUsername = message.sender?.username
val senderRoles = roomViewModel.roles.find { it.user.username == senderUsername }?.roles
?: emptyList()
return roomViewModel.isBroadcast &&
!message.isSystemMessage() &&
senderUsername != currentUsername &&
senderRoles.any { it == "moderator" || it == "owner" || it != "bot" }
senderUsername != currentUsername
}
private fun mapMessageReply(message: Message, chatRoom: ChatRoom): MessageReplyViewModel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment