Invite: fix inviterId being overrided

This commit is contained in:
ganfra 2020-02-25 10:53:47 +01:00
parent 483256093a
commit 19b9617a09

View file

@ -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)