fix: Cache user profile even with cache=false when there is a cache

This commit is contained in:
Christian Pauly 2022-07-11 10:48:22 +02:00
parent 39eccd3d06
commit 7e06d0f578
1 changed files with 3 additions and 1 deletions

View File

@ -769,7 +769,9 @@ class Client extends MatrixApi {
}
}
profile = await getUserProfile(userId);
if (cache) _profileCache[userId] = profile;
if (cache || _profileCache.containsKey(userId)) {
_profileCache[userId] = profile;
}
return Profile(
userId: userId,
displayName: profile.displayname,