From 2eef0a616214bab4b6bc6f78b3131dc90dc04520 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 1 Jul 2019 11:27:57 +0200 Subject: [PATCH] Fix ban and kick bad message error (Fixes #184 Fixes #248) --- .../home/room/detail/timeline/format/NoticeEventFormatter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/format/NoticeEventFormatter.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/format/NoticeEventFormatter.kt index 53f5b3bb..1408f7c7 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/format/NoticeEventFormatter.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/format/NoticeEventFormatter.kt @@ -152,7 +152,7 @@ class NoticeEventFormatter @Inject constructor(private val stringProvider: Strin private fun buildMembershipNotice(event: Event, senderName: String?, eventContent: RoomMember?, prevEventContent: RoomMember?): String? { val senderDisplayName = senderName ?: event.senderId - val targetDisplayName = eventContent?.displayName ?: event.senderId + val targetDisplayName = eventContent?.displayName ?: prevEventContent?.displayName ?: "" return when { Membership.INVITE == eventContent?.membership -> { // TODO get userId