mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix empty fallback photo appending.
This commit is contained in:
parent
66093f0cb5
commit
cad8a85497
1 changed files with 6 additions and 4 deletions
|
@ -384,10 +384,12 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
|
|||
}
|
||||
if (const auto photo = update.vfallback_photo()) {
|
||||
const auto data = user->owner().processPhoto(*photo);
|
||||
user->session().storage().add(Storage::UserPhotosSetBack(
|
||||
peerToUser(user->id),
|
||||
data->id
|
||||
));
|
||||
if (!data->isNull()) { // Sometimes there is photoEmpty :shrug:
|
||||
user->session().storage().add(Storage::UserPhotosSetBack(
|
||||
peerToUser(user->id),
|
||||
data->id
|
||||
));
|
||||
}
|
||||
}
|
||||
user->setSettings(update.vsettings());
|
||||
user->owner().notifySettings().apply(user, update.vnotify_settings());
|
||||
|
|
Loading…
Add table
Reference in a new issue