Invite: fix inviterId being overrided

This commit is contained in:
ganfra 2020-02-25 10:53:47 +01:00
parent 483256093a
commit 19b9617a09
1 changed files with 6 additions and 1 deletions

View File

@ -134,7 +134,12 @@ internal class RoomSummaryUpdater @Inject constructor(
roomSummaryEntity.isEncrypted = encryptionEvent != null
roomSummaryEntity.typingUserIds.clear()
roomSummaryEntity.typingUserIds.addAll(ephemeralResult?.typingUserIds.orEmpty())
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)