Do not fetch user if we do not have the previous content.
This commit is contained in:
parent
94a87744ac
commit
e3f5d15eaf
|
@ -140,7 +140,8 @@ internal class RoomMemberEventHandler @Inject constructor(
|
||||||
val previousDisplayName = prevContent?.get("displayname") as? String
|
val previousDisplayName = prevContent?.get("displayname") as? String
|
||||||
val previousAvatar = prevContent?.get("avatar_url") as? String
|
val previousAvatar = prevContent?.get("avatar_url") as? String
|
||||||
|
|
||||||
if (previousDisplayName != roomMember.displayName || previousAvatar != roomMember.avatarUrl) {
|
if ((previousDisplayName != null && previousDisplayName != roomMember.displayName) ||
|
||||||
|
(previousAvatar != null && previousAvatar != roomMember.avatarUrl)) {
|
||||||
aggregator.userIdsToFetch.add(eventUserId)
|
aggregator.userIdsToFetch.add(eventUserId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue