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

Move peer photo update from Messenger to ApiWrap.

This commit is contained in:
John Preston
2018-09-06 14:13:54 +03:00
parent e2207e33ef
commit 8c1cc51c2e
13 changed files with 190 additions and 230 deletions

View File

@@ -426,9 +426,7 @@ void GroupInfoBox::createGroup(not_null<PeerListBox*> selectUsersBox, const QStr
| [this](not_null<ChatData*> chat) {
auto image = _photo->takeResultImage();
if (!image.isNull()) {
Messenger::Instance().uploadProfilePhoto(
std::move(image),
chat->id);
Auth().api().uploadPeerPhoto(chat, std::move(image));
}
Ui::showPeerHistory(chat, ShowAtUnreadMsgId);
};
@@ -531,9 +529,7 @@ void GroupInfoBox::createChannel(const QString &title, const QString &descriptio
| [this](not_null<ChannelData*> channel) {
auto image = _photo->takeResultImage();
if (!image.isNull()) {
Messenger::Instance().uploadProfilePhoto(
std::move(image),
channel->id);
Auth().api().uploadPeerPhoto(channel, std::move(image));
}
_createdChannel = channel;
_creationRequestId = request(