Revert fixing users as it's not the good catch

This commit is contained in:
ganfra 2020-07-10 20:09:30 +02:00
parent 150d44aafd
commit e07a584d66

View file

@ -34,7 +34,7 @@ internal class RoomMemberEventHandler @Inject constructor() {
val userId = event.stateKey ?: return false
val roomMemberEntity = RoomMemberEntityFactory.create(roomId, userId, roomMember)
realm.insertOrUpdate(roomMemberEntity)
if (roomMember.membership.isActive() && event.unsignedData?.replacesState.isNullOrEmpty()) {
if (roomMember.membership.isActive()) {
val userEntity = UserEntityFactory.create(userId, roomMember)
realm.insertOrUpdate(userEntity)
}