Fix empty fallback photo appending.
This commit is contained in:
parent
66093f0cb5
commit
cad8a85497
|
@ -384,11 +384,13 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
|
||||||
}
|
}
|
||||||
if (const auto photo = update.vfallback_photo()) {
|
if (const auto photo = update.vfallback_photo()) {
|
||||||
const auto data = user->owner().processPhoto(*photo);
|
const auto data = user->owner().processPhoto(*photo);
|
||||||
|
if (!data->isNull()) { // Sometimes there is photoEmpty :shrug:
|
||||||
user->session().storage().add(Storage::UserPhotosSetBack(
|
user->session().storage().add(Storage::UserPhotosSetBack(
|
||||||
peerToUser(user->id),
|
peerToUser(user->id),
|
||||||
data->id
|
data->id
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
user->setSettings(update.vsettings());
|
user->setSettings(update.vsettings());
|
||||||
user->owner().notifySettings().apply(user, update.vnotify_settings());
|
user->owner().notifySettings().apply(user, update.vnotify_settings());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue