2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add edit / view of user information for support.

This commit is contained in:
John Preston
2018-11-20 19:36:36 +04:00
parent 5e1b8212b2
commit 9a8ab84ecb
13 changed files with 407 additions and 43 deletions

View File

@@ -44,6 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "chat_helpers/stickers.h"
#include "ui/text_options.h"
#include "ui/emoji_config.h"
#include "support/support_helper.h"
#include "storage/localimageloader.h"
#include "storage/file_download.h"
#include "storage/file_upload.h"
@@ -814,18 +815,25 @@ void ApiWrap::requestFullPeer(PeerData *peer) {
auto failHandler = [this, peer](const RPCError &error) {
_fullPeerRequests.remove(peer);
};
if (auto user = peer->asUser()) {
if (const auto user = peer->asUser()) {
if (_session->supportMode()) {
_session->supportHelper().refreshInfo(user);
}
return request(MTPusers_GetFullUser(
user->inputUser
)).done([this, user](const MTPUserFull &result, mtpRequestId requestId) {
)).done([=](const MTPUserFull &result, mtpRequestId requestId) {
gotUserFull(user, result, requestId);
}).fail(failHandler).send();
} else if (auto chat = peer->asChat()) {
return request(MTPmessages_GetFullChat(chat->inputChat)).done([this, peer](const MTPmessages_ChatFull &result, mtpRequestId requestId) {
} else if (const auto chat = peer->asChat()) {
return request(MTPmessages_GetFullChat(
chat->inputChat
)).done([=](const MTPmessages_ChatFull &result, mtpRequestId requestId) {
gotChatFull(peer, result, requestId);
}).fail(failHandler).send();
} else if (auto channel = peer->asChannel()) {
return request(MTPchannels_GetFullChannel(channel->inputChannel)).done([this, peer](const MTPmessages_ChatFull &result, mtpRequestId requestId) {
} else if (const auto channel = peer->asChannel()) {
return request(MTPchannels_GetFullChannel(
channel->inputChannel
)).done([=](const MTPmessages_ChatFull &result, mtpRequestId requestId) {
gotChatFull(peer, result, requestId);
}).fail(failHandler).send();
}