UserEntity: fix not inserted at all

This commit is contained in:
ganfra 2019-07-23 21:31:58 +02:00
parent 125eacb20b
commit 507bc2f622

View File

@ -31,12 +31,12 @@ internal object UserEntityFactory {
}
val roomMember = event.content.toModel<RoomMember>() ?: return null
// We only use JOIN and INVITED memberships to create User data
if (roomMember.membership != Membership.JOIN || roomMember.membership != Membership.INVITE) {
if (roomMember.membership != Membership.JOIN && roomMember.membership != Membership.INVITE) {
return null
}
return UserEntity(event.stateKey ?: "",
roomMember.displayName ?: "",
roomMember.avatarUrl ?: ""
roomMember.displayName ?: "",
roomMember.avatarUrl ?: ""
)
}