2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Support new ('modern') API file locations.

This commit is contained in:
John Preston
2019-03-22 18:19:43 +04:00
parent eba2a98703
commit aa8f62da9d
41 changed files with 947 additions and 566 deletions

View File

@@ -31,12 +31,11 @@ void ChatData::setPhoto(const MTPChatPhoto &photo) {
}
void ChatData::setPhoto(PhotoId photoId, const MTPChatPhoto &photo) {
if (photo.type() == mtpc_chatPhoto) {
const auto &data = photo.c_chatPhoto();
updateUserpic(photoId, data.vphoto_small);
} else {
photo.match([&](const MTPDchatPhoto &data) {
updateUserpic(photoId, data.vdc_id.v, data.vphoto_small);
}, [&](const MTPDchatPhotoEmpty &) {
clearUserpic();
}
});
}
auto ChatData::DefaultAdminRights() -> AdminRights {