mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Update API scheme to layer 158.
This commit is contained in:
@@ -186,6 +186,7 @@ void PeerPhoto::updateSelf(
|
||||
const auto usedFileReference = photo->fileReference();
|
||||
_api.request(MTPphotos_UpdateProfilePhoto(
|
||||
MTP_flags(0),
|
||||
MTPInputUser(), // bot
|
||||
photo->mtpInput()
|
||||
)).done([=](const MTPphotos_Photo &result) {
|
||||
result.match([&](const MTPDphotos_photo &data) {
|
||||
@@ -252,6 +253,7 @@ void PeerPhoto::clear(not_null<PhotoData*> photo) {
|
||||
if (self->userpicPhotoId() == photo->id) {
|
||||
_api.request(MTPphotos_UpdateProfilePhoto(
|
||||
MTP_flags(0),
|
||||
MTPInputUser(), // bot
|
||||
MTP_inputPhotoEmpty()
|
||||
)).done([=](const MTPphotos_Photo &result) {
|
||||
self->setPhoto(MTP_userProfilePhotoEmpty());
|
||||
@@ -276,6 +278,7 @@ void PeerPhoto::clear(not_null<PhotoData*> photo) {
|
||||
if (fallbackPhotoId && (*fallbackPhotoId) == photo->id) {
|
||||
_api.request(MTPphotos_UpdateProfilePhoto(
|
||||
MTP_flags(MTPphotos_UpdateProfilePhoto::Flag::f_fallback),
|
||||
MTPInputUser(), // bot
|
||||
MTP_inputPhotoEmpty()
|
||||
)).send();
|
||||
_session->storage().add(Storage::UserPhotosSetBack(
|
||||
@@ -321,6 +324,7 @@ void PeerPhoto::set(not_null<PeerData*> peer, not_null<PhotoData*> photo) {
|
||||
if (peer == _session->user()) {
|
||||
_api.request(MTPphotos_UpdateProfilePhoto(
|
||||
MTP_flags(0),
|
||||
MTPInputUser(), // bot
|
||||
photo->mtpInput()
|
||||
)).done([=](const MTPphotos_Photo &result) {
|
||||
result.match([&](const MTPDphotos_photo &data) {
|
||||
@@ -370,6 +374,7 @@ void PeerPhoto::ready(
|
||||
MTP_flags((file ? Flag::f_file : none)
|
||||
| (videoSize ? Flag::f_video_emoji_markup : none)
|
||||
| ((type == UploadType::Fallback) ? Flag::f_fallback : none)),
|
||||
MTPInputUser(), // bot
|
||||
file ? (*file) : MTPInputFile(),
|
||||
MTPInputFile(), // video
|
||||
MTPdouble(), // video_start_ts
|
||||
|
Reference in New Issue
Block a user