2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Pass correct FileOrigin for userpics.

This commit is contained in:
John Preston
2018-10-31 13:55:22 +04:00
parent e6c4c48261
commit 8850d974a2
4 changed files with 16 additions and 13 deletions

View File

@@ -183,10 +183,13 @@ public:
PhotoId userpicPhotoId() const {
return userpicPhotoUnknown() ? 0 : _userpicPhotoId;
}
Data::FileOrigin userpicOrigin() const {
return Data::FileOrigin(Data::FileOriginPeerPhoto(id));
}
Data::FileOrigin userpicPhotoOrigin() const {
return (isUser() && userpicPhotoId())
? Data::FileOriginUserPhoto(bareId(), userpicPhotoId())
: Data::FileOrigin(Data::FileOriginPeerPhoto(id));
: Data::FileOrigin();
}
int nameVersion = 1;