From 19b9617a09e604aa2ddb4e3c11252e81afa365fd Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 25 Feb 2020 10:53:47 +0100 Subject: [PATCH] Invite: fix inviterId being overrided --- .../android/internal/session/room/RoomSummaryUpdater.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomSummaryUpdater.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomSummaryUpdater.kt index 864f25cf12..e6e2b16477 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomSummaryUpdater.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/RoomSummaryUpdater.kt @@ -134,7 +134,12 @@ internal class RoomSummaryUpdater @Inject constructor( roomSummaryEntity.isEncrypted = encryptionEvent != null roomSummaryEntity.typingUserIds.clear() roomSummaryEntity.typingUserIds.addAll(ephemeralResult?.typingUserIds.orEmpty()) - roomSummaryEntity.inviterId = inviterId + + if (roomSummaryEntity.membership == Membership.INVITE && inviterId != null) { + roomSummaryEntity.inviterId = inviterId + } else if (roomSummaryEntity.membership != Membership.INVITE) { + roomSummaryEntity.inviterId = null + } if (updateMembers) { val otherRoomMembers = RoomMemberHelper(realm, roomId)