mirror of https://github.com/procxx/kepka.git
Merge branch 'master' of https://bitbucket.org/johnprestonmail/telegram-desktop
This commit is contained in:
commit
a42a76a4ec
|
@ -485,6 +485,13 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||||
"lng_in_dlg_sticker" = "Sticker";
|
"lng_in_dlg_sticker" = "Sticker";
|
||||||
"lng_in_dlg_sticker_emoji" = "{emoji} (sticker)";
|
"lng_in_dlg_sticker_emoji" = "{emoji} (sticker)";
|
||||||
|
|
||||||
|
"lng_report_spam" = "Report Spam";
|
||||||
|
"lng_report_spam_hide" = "Hide";
|
||||||
|
"lng_report_spam_thanks" = "Thank you for your report!";
|
||||||
|
"lng_cant_send_to_not_contact" = "Sorry, you can only send messages to\nmutual contacts at the moment. {more_info}";
|
||||||
|
"lng_cant_invite_not_contact" = "Sorry, you can only add mutual contacts\nto groups at the moment. {more_info}";
|
||||||
|
"lng_cant_more_info" = "More info »";
|
||||||
|
|
||||||
"lng_send_button" = "Send";
|
"lng_send_button" = "Send";
|
||||||
"lng_message_ph" = "Write a message..";
|
"lng_message_ph" = "Write a message..";
|
||||||
"lng_record_cancel" = "Release outside this field to cancel";
|
"lng_record_cancel" = "Release outside this field to cancel";
|
||||||
|
@ -648,7 +655,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
"lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}";
|
"lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}";
|
||||||
"lng_new_version_minor" = "— Bug fixes and other minor improvements";
|
"lng_new_version_minor" = "— Bug fixes and other minor improvements";
|
||||||
"lng_new_version_text" = "— Include muted chats in unread count in Settings\n— Shared links overview and search in shared media\n— Preview when sending links to GIF animations and PDF files";
|
"lng_new_version_text" = "— Spam report buttons in new chats\n— Other fixes and improvements\n— OS X 10.8 notifications fixed";
|
||||||
|
|
||||||
"lng_menu_insert_unicode" = "Insert Unicode control character";
|
"lng_menu_insert_unicode" = "Insert Unicode control character";
|
||||||
|
|
||||||
|
|
|
@ -1072,7 +1072,34 @@ textRectMargins: margins(-2px, -1px, -2px, -1px);
|
||||||
taMsgField: flatTextarea(taDefFlat) {
|
taMsgField: flatTextarea(taDefFlat) {
|
||||||
font: msgFont;
|
font: msgFont;
|
||||||
}
|
}
|
||||||
maxFieldHeight: 243px;
|
maxFieldHeight: 220px;
|
||||||
|
// historyMinHeight: 56px;
|
||||||
|
|
||||||
|
reportSpamHide: flatButton(topBarButton) {
|
||||||
|
height: 46px;
|
||||||
|
|
||||||
|
textTop: 15px;
|
||||||
|
overTextTop: 15px;
|
||||||
|
downTextTop: 16px;
|
||||||
|
|
||||||
|
bgColor: transparent;
|
||||||
|
overBgColor: transparent;
|
||||||
|
downBgColor: transparent;
|
||||||
|
}
|
||||||
|
reportSpamButton: flatButton(reportSpamHide) {
|
||||||
|
textTop: 6px;
|
||||||
|
overTextTop: 6px;
|
||||||
|
downTextTop: 7px;
|
||||||
|
|
||||||
|
width: -50px;
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
bgColor: #888;
|
||||||
|
overBgColor: #7b7b7b;
|
||||||
|
downBgColor: #7b7b7b;
|
||||||
|
}
|
||||||
|
reportSpamSeparator: 30px;
|
||||||
|
reportSpamBg: #fffffff0;
|
||||||
|
|
||||||
newMsgSound: ':/gui/art/newmsg.wav';
|
newMsgSound: ':/gui/art/newmsg.wav';
|
||||||
|
|
||||||
|
|
|
@ -446,6 +446,10 @@ namespace App {
|
||||||
data->setBotInfoVersion(-1);
|
data->setBotInfoVersion(-1);
|
||||||
}
|
}
|
||||||
data->contact = (flags & (MTPDuser_flag_contact | MTPDuser_flag_mutual_contact)) ? 1 : (data->phone.isEmpty() ? -1 : 0);
|
data->contact = (flags & (MTPDuser_flag_contact | MTPDuser_flag_mutual_contact)) ? 1 : (data->phone.isEmpty() ? -1 : 0);
|
||||||
|
if (data->contact == 1 && cReportSpamStatuses().value(data->id, dbiprsNoButton) != dbiprsNoButton) {
|
||||||
|
cRefReportSpamStatuses().insert(data->id, dbiprsNoButton);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
}
|
||||||
if ((flags & MTPDuser_flag_self) && ::self != data) {
|
if ((flags & MTPDuser_flag_self) && ::self != data) {
|
||||||
::self = data;
|
::self = data;
|
||||||
if (App::wnd()) App::wnd()->updateGlobalMenu();
|
if (App::wnd()) App::wnd()->updateGlobalMenu();
|
||||||
|
@ -566,10 +570,17 @@ namespace App {
|
||||||
int32 pversion = chat->participants.isEmpty() ? 1 : (chat->participants.begin().value() + 1);
|
int32 pversion = chat->participants.isEmpty() ? 1 : (chat->participants.begin().value() + 1);
|
||||||
chat->cankick = ChatData::CanKick();
|
chat->cankick = ChatData::CanKick();
|
||||||
for (QVector<MTPChatParticipant>::const_iterator i = v.cbegin(), e = v.cend(); i != e; ++i) {
|
for (QVector<MTPChatParticipant>::const_iterator i = v.cbegin(), e = v.cend(); i != e; ++i) {
|
||||||
UserData *user = App::userLoaded(i->c_chatParticipant().vuser_id.v);
|
if (i->type() != mtpc_chatParticipant) continue;
|
||||||
|
|
||||||
|
const MTPDchatParticipant &p(i->c_chatParticipant());
|
||||||
|
//if (p.vuser_id.v == MTP::authedId()) {
|
||||||
|
// chat->inviter = p.vinviter_id.v; // we use inviter only from service msgs
|
||||||
|
// chat->inviteDate = p.vdate.v;
|
||||||
|
//}
|
||||||
|
UserData *user = App::userLoaded(p.vuser_id.v);
|
||||||
if (user) {
|
if (user) {
|
||||||
chat->participants[user] = pversion;
|
chat->participants[user] = pversion;
|
||||||
if (i->c_chatParticipant().vinviter_id.v == MTP::authedId()) {
|
if (p.vinviter_id.v == MTP::authedId()) {
|
||||||
chat->cankick[user] = true;
|
chat->cankick[user] = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -619,6 +630,10 @@ namespace App {
|
||||||
ChatData *chat = App::chat(d.vchat_id.v);
|
ChatData *chat = App::chat(d.vchat_id.v);
|
||||||
if (chat->version <= d.vversion.v && chat->count >= 0) {
|
if (chat->version <= d.vversion.v && chat->count >= 0) {
|
||||||
chat->version = d.vversion.v;
|
chat->version = d.vversion.v;
|
||||||
|
//if (d.vuser_id.v == MTP::authedId()) {
|
||||||
|
// chat->inviter = d.vinviter_id.v; // we use inviter only from service msgs
|
||||||
|
// chat->inviteDate = unixtime(); // no event date here :(
|
||||||
|
//}
|
||||||
UserData *user = App::userLoaded(d.vuser_id.v);
|
UserData *user = App::userLoaded(d.vuser_id.v);
|
||||||
if (user) {
|
if (user) {
|
||||||
if (chat->participants.isEmpty() && chat->count) {
|
if (chat->participants.isEmpty() && chat->count) {
|
||||||
|
@ -864,6 +879,10 @@ namespace App {
|
||||||
switch (myLink.type()) {
|
switch (myLink.type()) {
|
||||||
case mtpc_contactLinkContact:
|
case mtpc_contactLinkContact:
|
||||||
user->contact = 1;
|
user->contact = 1;
|
||||||
|
if (user->contact == 1 && cReportSpamStatuses().value(user->id, dbiprsNoButton) != dbiprsNoButton) {
|
||||||
|
cRefReportSpamStatuses().insert(user->id, dbiprsNoButton);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case mtpc_contactLinkHasPhone:
|
case mtpc_contactLinkHasPhone:
|
||||||
user->contact = 0;
|
user->contact = 0;
|
||||||
|
@ -1724,6 +1743,7 @@ namespace App {
|
||||||
cSetStickerSets(StickerSets());
|
cSetStickerSets(StickerSets());
|
||||||
cSetStickerSetsOrder(StickerSetsOrder());
|
cSetStickerSetsOrder(StickerSetsOrder());
|
||||||
cSetLastStickersUpdate(0);
|
cSetLastStickersUpdate(0);
|
||||||
|
cSetReportSpamStatuses(ReportSpamStatuses());
|
||||||
::videoItems.clear();
|
::videoItems.clear();
|
||||||
::audioItems.clear();
|
::audioItems.clear();
|
||||||
::documentItems.clear();
|
::documentItems.clear();
|
||||||
|
|
|
@ -1282,7 +1282,7 @@ void CreateGroupBox::created(const MTPUpdates &updates) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreateGroupBox::failed(const RPCError &error) {
|
bool CreateGroupBox::failed(const RPCError &error) {
|
||||||
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
if (mtpIsFlood(error)) return false;
|
||||||
|
|
||||||
_createRequestId = 0;
|
_createRequestId = 0;
|
||||||
if (error.type() == "NO_CHAT_TITLE") {
|
if (error.type() == "NO_CHAT_TITLE") {
|
||||||
|
@ -1291,6 +1291,10 @@ bool CreateGroupBox::failed(const RPCError &error) {
|
||||||
} else if (error.type() == "USERS_TOO_FEW") {
|
} else if (error.type() == "USERS_TOO_FEW") {
|
||||||
emit closed();
|
emit closed();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (error.type() == "PEER_FLOOD") {
|
||||||
|
emit closed();
|
||||||
|
App::wnd()->showLayer(new ConfirmBox(lng_cant_invite_not_contact(lt_more_info, QString()), true));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -814,7 +814,6 @@ void DialogsListWidget::peopleReceived(const QString &query, const QVector<MTPCo
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsListWidget::contactsReceived(const QVector<MTPContact> &contacts) {
|
void DialogsListWidget::contactsReceived(const QVector<MTPContact> &contacts) {
|
||||||
cSetContactsReceived(true);
|
|
||||||
for (QVector<MTPContact>::const_iterator i = contacts.cbegin(), e = contacts.cend(); i != e; ++i) {
|
for (QVector<MTPContact>::const_iterator i = contacts.cbegin(), e = contacts.cend(); i != e; ++i) {
|
||||||
int32 uid = i->c_contact().vuser_id.v;
|
int32 uid = i->c_contact().vuser_id.v;
|
||||||
addNewContact(uid);
|
addNewContact(uid);
|
||||||
|
@ -1739,11 +1738,13 @@ void DialogsWidget::loadDialogs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsWidget::contactsReceived(const MTPcontacts_Contacts &contacts) {
|
void DialogsWidget::contactsReceived(const MTPcontacts_Contacts &contacts) {
|
||||||
|
cSetContactsReceived(true);
|
||||||
if (contacts.type() == mtpc_contacts_contacts) {
|
if (contacts.type() == mtpc_contacts_contacts) {
|
||||||
const MTPDcontacts_contacts &d(contacts.c_contacts_contacts());
|
const MTPDcontacts_contacts &d(contacts.c_contacts_contacts());
|
||||||
App::feedUsers(d.vusers);
|
App::feedUsers(d.vusers);
|
||||||
list.contactsReceived(d.vcontacts.c_vector().v);
|
list.contactsReceived(d.vcontacts.c_vector().v);
|
||||||
}
|
}
|
||||||
|
if (App::main()) App::main()->contactsReceived();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DialogsWidget::contactsFailed(const RPCError &error) {
|
bool DialogsWidget::contactsFailed(const RPCError &error) {
|
||||||
|
|
|
@ -2220,8 +2220,11 @@ QString formatSizeText(qint64 size) {
|
||||||
qint64 sizeTenthMb = (size * 10 / (1024 * 1024));
|
qint64 sizeTenthMb = (size * 10 / (1024 * 1024));
|
||||||
return QString::number(sizeTenthMb / 10) + '.' + QString::number(sizeTenthMb % 10) + qsl(" MB");
|
return QString::number(sizeTenthMb / 10) + '.' + QString::number(sizeTenthMb % 10) + qsl(" MB");
|
||||||
}
|
}
|
||||||
qint64 sizeTenthKb = (size * 10 / 1024);
|
if (size >= 1024) {
|
||||||
return QString::number(sizeTenthKb / 10) + '.' + QString::number(sizeTenthKb % 10) + qsl(" KB");
|
qint64 sizeTenthKb = (size * 10 / 1024);
|
||||||
|
return QString::number(sizeTenthKb / 10) + '.' + QString::number(sizeTenthKb % 10) + qsl(" KB");
|
||||||
|
}
|
||||||
|
return QString::number(size) + qsl(" B");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString formatDownloadText(qint64 ready, qint64 total) {
|
QString formatDownloadText(qint64 ready, qint64 total) {
|
||||||
|
@ -2231,11 +2234,15 @@ QString formatDownloadText(qint64 ready, qint64 total) {
|
||||||
readyStr = QString::number(readyTenthMb / 10) + '.' + QString::number(readyTenthMb % 10);
|
readyStr = QString::number(readyTenthMb / 10) + '.' + QString::number(readyTenthMb % 10);
|
||||||
totalStr = QString::number(totalTenthMb / 10) + '.' + QString::number(totalTenthMb % 10);
|
totalStr = QString::number(totalTenthMb / 10) + '.' + QString::number(totalTenthMb % 10);
|
||||||
mb = qsl("MB");
|
mb = qsl("MB");
|
||||||
} else {
|
} else if (total >= 1024) {
|
||||||
qint64 readyKb = (ready / 1024), totalKb = (total / 1024);
|
qint64 readyKb = (ready / 1024), totalKb = (total / 1024);
|
||||||
readyStr = QString::number(readyKb);
|
readyStr = QString::number(readyKb);
|
||||||
totalStr = QString::number(totalKb);
|
totalStr = QString::number(totalKb);
|
||||||
mb = qsl("KB");
|
mb = qsl("KB");
|
||||||
|
} else {
|
||||||
|
readyStr = QString::number(ready);
|
||||||
|
totalStr = QString::number(total);
|
||||||
|
mb = qsl("B");
|
||||||
}
|
}
|
||||||
return lng_save_downloaded(lt_ready, readyStr, lt_total, totalStr, lt_mb, mb);
|
return lng_save_downloaded(lt_ready, readyStr, lt_total, totalStr, lt_mb, mb);
|
||||||
}
|
}
|
||||||
|
@ -6313,6 +6320,11 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) {
|
||||||
UserData *u = App::user(App::peerFromUser(d.vuser_id));
|
UserData *u = App::user(App::peerFromUser(d.vuser_id));
|
||||||
second = TextLinkPtr(new PeerLink(u));
|
second = TextLinkPtr(new PeerLink(u));
|
||||||
text = lng_action_add_user(lt_from, from, lt_user, textcmdLink(2, u->name));
|
text = lng_action_add_user(lt_from, from, lt_user, textcmdLink(2, u->name));
|
||||||
|
if (d.vuser_id.v == MTP::authedId() && unread()) {
|
||||||
|
if (history()->peer->chat && !history()->peer->asChat()->inviterForSpamReport && !_from->chat) {
|
||||||
|
history()->peer->asChat()->inviterForSpamReport = App::userFromPeer(_from->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
@ -6330,6 +6342,11 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) {
|
||||||
case mtpc_messageActionChatCreate: {
|
case mtpc_messageActionChatCreate: {
|
||||||
const MTPDmessageActionChatCreate &d(action.c_messageActionChatCreate());
|
const MTPDmessageActionChatCreate &d(action.c_messageActionChatCreate());
|
||||||
text = lng_action_created_chat(lt_from, from, lt_title, textClean(qs(d.vtitle)));
|
text = lng_action_created_chat(lt_from, from, lt_title, textClean(qs(d.vtitle)));
|
||||||
|
if (unread()) {
|
||||||
|
if (history()->peer->chat && !history()->peer->asChat()->inviterForSpamReport && !_from->chat && App::userFromPeer(_from->id) != MTP::authedId()) {
|
||||||
|
history()->peer->asChat()->inviterForSpamReport = App::userFromPeer(_from->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case mtpc_messageActionChatDeletePhoto: {
|
case mtpc_messageActionChatDeletePhoto: {
|
||||||
|
|
|
@ -1636,6 +1636,52 @@ void MessageField::focusInEvent(QFocusEvent *e) {
|
||||||
emit focused();
|
emit focused();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReportSpamPanel::ReportSpamPanel(HistoryWidget *parent) : TWidget(parent),
|
||||||
|
_report(this, lang(lng_report_spam), st::reportSpamHide),
|
||||||
|
_hide(this, lang(lng_report_spam_hide), st::reportSpamHide),
|
||||||
|
_clear(this, lang(lng_profile_delete_conversation)) {
|
||||||
|
resize(parent->width(), _hide.height() + st::titleShadow);
|
||||||
|
|
||||||
|
connect(&_report, SIGNAL(clicked()), this, SIGNAL(reportClicked()));
|
||||||
|
connect(&_hide, SIGNAL(clicked()), this, SIGNAL(hideClicked()));
|
||||||
|
connect(&_clear, SIGNAL(clicked()), this, SIGNAL(clearClicked()));
|
||||||
|
|
||||||
|
_clear.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSpamPanel::resizeEvent(QResizeEvent *e) {
|
||||||
|
_report.resize(width() - (_hide.width() + st::reportSpamSeparator) * 2, _report.height());
|
||||||
|
_report.moveToLeft(_hide.width() + st::reportSpamSeparator, 0, width());
|
||||||
|
_hide.moveToRight(0, 0, width());
|
||||||
|
_clear.move((width() - _clear.width()) / 2, height() - _clear.height() - ((height() - st::msgFont->height - _clear.height()) / 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSpamPanel::paintEvent(QPaintEvent *e) {
|
||||||
|
Painter p(this);
|
||||||
|
p.fillRect(QRect(0, 0, width(), height() - st::titleShadow), st::reportSpamBg->b);
|
||||||
|
if (cWideMode()) {
|
||||||
|
p.fillRect(st::titleShadow, height() - st::titleShadow, width() - st::titleShadow, st::titleShadow, st::titleShadowColor->b);
|
||||||
|
} else {
|
||||||
|
p.fillRect(0, height() - st::titleShadow, width(), st::titleShadow, st::titleShadowColor->b);
|
||||||
|
}
|
||||||
|
if (!_clear.isHidden()) {
|
||||||
|
p.setPen(st::black->p);
|
||||||
|
p.setFont(st::msgFont->f);
|
||||||
|
p.drawText(QRect(_report.x(), (_clear.y() - st::msgFont->height) / 2, _report.width(), st::msgFont->height), lang(lng_report_spam_thanks), style::al_top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSpamPanel::setReported(bool reported) {
|
||||||
|
if (reported) {
|
||||||
|
_report.hide();
|
||||||
|
_clear.show();
|
||||||
|
} else {
|
||||||
|
_report.show();
|
||||||
|
_clear.hide();
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
BotKeyboard::BotKeyboard() : _wasForMsgId(0), _height(0), _maxOuterHeight(0), _maximizeSize(false), _singleUse(false), _forceReply(false),
|
BotKeyboard::BotKeyboard() : _wasForMsgId(0), _height(0), _maxOuterHeight(0), _maximizeSize(false), _singleUse(false), _forceReply(false),
|
||||||
_sel(-1), _down(-1), _hoverAnim(animFunc(this, &BotKeyboard::hoverStep)), _st(&st::botKbButton) {
|
_sel(-1), _down(-1), _hoverAnim(animFunc(this, &BotKeyboard::hoverStep)), _st(&st::botKbButton) {
|
||||||
setGeometry(0, 0, _st->margin, _st->margin);
|
setGeometry(0, 0, _st->margin, _st->margin);
|
||||||
|
@ -2198,6 +2244,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
, _replyTo(0)
|
, _replyTo(0)
|
||||||
, _replyToNameVersion(0)
|
, _replyToNameVersion(0)
|
||||||
, _replyForwardPreviewCancel(this, st::replyCancel)
|
, _replyForwardPreviewCancel(this, st::replyCancel)
|
||||||
|
, _reportSpamStatus(dbiprsUnknown)
|
||||||
, _previewData(0)
|
, _previewData(0)
|
||||||
, _previewRequest(0)
|
, _previewRequest(0)
|
||||||
, _previewCancelled(false)
|
, _previewCancelled(false)
|
||||||
|
@ -2205,6 +2252,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
, _replyReturn(0)
|
, _replyReturn(0)
|
||||||
, _stickersUpdateRequest(0)
|
, _stickersUpdateRequest(0)
|
||||||
, _peer(0)
|
, _peer(0)
|
||||||
|
, _clearPeer(0)
|
||||||
, _showAtMsgId(0)
|
, _showAtMsgId(0)
|
||||||
, _preloadRequest(0), _preloadDownRequest(0)
|
, _preloadRequest(0), _preloadDownRequest(0)
|
||||||
, _delayedShowAtMsgId(-1)
|
, _delayedShowAtMsgId(-1)
|
||||||
|
@ -2216,10 +2264,12 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
, _histInited(false)
|
, _histInited(false)
|
||||||
, _toHistoryEnd(this, st::historyToEnd)
|
, _toHistoryEnd(this, st::historyToEnd)
|
||||||
, _attachMention(this)
|
, _attachMention(this)
|
||||||
|
, _reportSpamPanel(this)
|
||||||
, _send(this, lang(lng_send_button), st::btnSend)
|
, _send(this, lang(lng_send_button), st::btnSend)
|
||||||
, _unblock(this, lang(lng_unblock_button), st::btnUnblock)
|
, _unblock(this, lang(lng_unblock_button), st::btnUnblock)
|
||||||
, _botStart(this, lang(lng_bot_start), st::btnSend)
|
, _botStart(this, lang(lng_bot_start), st::btnSend)
|
||||||
, _unblockRequest(0)
|
, _unblockRequest(0)
|
||||||
|
, _reportSpamRequest(0)
|
||||||
, _attachDocument(this, st::btnAttachDocument)
|
, _attachDocument(this, st::btnAttachDocument)
|
||||||
, _attachPhoto(this, st::btnAttachPhoto)
|
, _attachPhoto(this, st::btnAttachPhoto)
|
||||||
, _attachEmoji(this, st::btnAttachEmoji)
|
, _attachEmoji(this, st::btnAttachEmoji)
|
||||||
|
@ -2259,6 +2309,9 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onListScroll()));
|
connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onListScroll()));
|
||||||
|
connect(&_reportSpamPanel, SIGNAL(reportClicked()), this, SLOT(onReportSpamClicked()));
|
||||||
|
connect(&_reportSpamPanel, SIGNAL(hideClicked()), this, SLOT(onReportSpamHide()));
|
||||||
|
connect(&_reportSpamPanel, SIGNAL(clearClicked()), this, SLOT(onReportSpamClear()));
|
||||||
connect(&_toHistoryEnd, SIGNAL(clicked()), this, SLOT(onHistoryToEnd()));
|
connect(&_toHistoryEnd, SIGNAL(clicked()), this, SLOT(onHistoryToEnd()));
|
||||||
connect(&_replyForwardPreviewCancel, SIGNAL(clicked()), this, SLOT(onReplyForwardPreviewCancel()));
|
connect(&_replyForwardPreviewCancel, SIGNAL(clicked()), this, SLOT(onReplyForwardPreviewCancel()));
|
||||||
connect(&_send, SIGNAL(clicked()), this, SLOT(onSend()));
|
connect(&_send, SIGNAL(clicked()), this, SLOT(onSend()));
|
||||||
|
@ -2328,6 +2381,9 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
_unblock.hide();
|
_unblock.hide();
|
||||||
_botStart.hide();
|
_botStart.hide();
|
||||||
|
|
||||||
|
_reportSpamPanel.move(0, 0);
|
||||||
|
_reportSpamPanel.hide();
|
||||||
|
|
||||||
_attachDocument.hide();
|
_attachDocument.hide();
|
||||||
_attachPhoto.hide();
|
_attachPhoto.hide();
|
||||||
_attachEmoji.hide();
|
_attachEmoji.hide();
|
||||||
|
@ -2795,7 +2851,7 @@ void HistoryWidget::showPeerHistory(const PeerId &peerId, MsgId showAtMsgId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_peer = peerId ? App::peer(peerId) : 0;
|
_peer = peerId ? App::peer(peerId) : 0;
|
||||||
_unblockRequest = 0;
|
_unblockRequest = _reportSpamRequest = 0;
|
||||||
|
|
||||||
_titlePeerText = QString();
|
_titlePeerText = QString();
|
||||||
_titlePeerTextWidth = 0;
|
_titlePeerTextWidth = 0;
|
||||||
|
@ -2905,8 +2961,72 @@ void HistoryWidget::clearAllLoadRequests() {
|
||||||
_preloadRequest = _preloadDownRequest = _firstLoadRequest = 0;
|
_preloadRequest = _preloadDownRequest = _firstLoadRequest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::contactsReceived() {
|
||||||
|
if (!_peer) return;
|
||||||
|
updateReportSpamStatus();
|
||||||
|
updateControlsVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::updateReportSpamStatus() {
|
||||||
|
if (!_peer || App::userFromPeer(_peer->id) == MTP::authedId()) {
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
ReportSpamStatuses::const_iterator i = cReportSpamStatuses().constFind(_peer->id);
|
||||||
|
if (i != cReportSpamStatuses().cend()) {
|
||||||
|
_reportSpamStatus = i.value();
|
||||||
|
_reportSpamPanel.setReported(_reportSpamStatus == dbiprsReportSent);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((!_history->loadedAtTop() && (_history->size() < 2 || _history->size() == 2 && _history->at(1)->size() < 2)) || !cContactsReceived() || _firstLoadRequest) {
|
||||||
|
_reportSpamStatus = dbiprsUnknown;
|
||||||
|
} else if (_peer->chat) {
|
||||||
|
if (_peer->asChat()->inviterForSpamReport > 0) {
|
||||||
|
UserData *user = App::userLoaded(_peer->asChat()->inviterForSpamReport);
|
||||||
|
if (user && user->contact > 0) {
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
} else {
|
||||||
|
_reportSpamStatus = dbiprsShowButton;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_peer->asUser()->contact > 0) {
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
} else {
|
||||||
|
bool anyFound = false, outFound = false;
|
||||||
|
for (int32 i = 0, l = _history->size(); i < l; ++i) {
|
||||||
|
for (int32 j = 0, c = _history->at(i)->size(); j < c; ++j) {
|
||||||
|
anyFound = true;
|
||||||
|
if (_history->at(i)->at(j)->out()) {
|
||||||
|
outFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (anyFound) {
|
||||||
|
if (outFound) {
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
} else {
|
||||||
|
_reportSpamStatus = dbiprsShowButton;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_reportSpamStatus = dbiprsUnknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_reportSpamStatus == dbiprsShowButton || _reportSpamStatus == dbiprsNoButton) {
|
||||||
|
_reportSpamPanel.setReported(false);
|
||||||
|
cRefReportSpamStatuses().insert(_peer->id, _reportSpamStatus);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryWidget::updateControlsVisibility() {
|
void HistoryWidget::updateControlsVisibility() {
|
||||||
if (!_history || _showAnim.animating()) {
|
if (!_history || _showAnim.animating()) {
|
||||||
|
_reportSpamPanel.hide();
|
||||||
_scroll.hide();
|
_scroll.hide();
|
||||||
_kbScroll.hide();
|
_kbScroll.hide();
|
||||||
_send.hide();
|
_send.hide();
|
||||||
|
@ -2933,6 +3053,11 @@ void HistoryWidget::updateControlsVisibility() {
|
||||||
} else {
|
} else {
|
||||||
_scroll.show();
|
_scroll.show();
|
||||||
}
|
}
|
||||||
|
if (_reportSpamStatus == dbiprsShowButton || _reportSpamStatus == dbiprsReportSent) {
|
||||||
|
_reportSpamPanel.show();
|
||||||
|
} else {
|
||||||
|
_reportSpamPanel.hide();
|
||||||
|
}
|
||||||
if ((_peer->chat && !_peer->asChat()->forbidden && !_peer->asChat()->left) || (!_peer->chat && _peer->asUser()->access != UserNoAccess)) {
|
if ((_peer->chat && !_peer->asChat()->forbidden && !_peer->asChat()->left) || (!_peer->chat && _peer->asUser()->access != UserNoAccess)) {
|
||||||
checkMentionDropdown();
|
checkMentionDropdown();
|
||||||
if (isBlocked()) {
|
if (isBlocked()) {
|
||||||
|
@ -3150,6 +3275,10 @@ void HistoryWidget::messagesReceived(const MTPmessages_Messages &messages, mtpRe
|
||||||
addMessagesToFront(*histList);
|
addMessagesToFront(*histList);
|
||||||
_preloadRequest = 0;
|
_preloadRequest = 0;
|
||||||
onListScroll();
|
onListScroll();
|
||||||
|
if (_reportSpamStatus == dbiprsUnknown) {
|
||||||
|
updateReportSpamStatus();
|
||||||
|
if (_reportSpamStatus != dbiprsUnknown) updateControlsVisibility();
|
||||||
|
}
|
||||||
} else if (_preloadDownRequest == requestId) {
|
} else if (_preloadDownRequest == requestId) {
|
||||||
addMessagesToBack(*histList);
|
addMessagesToBack(*histList);
|
||||||
_preloadDownRequest = 0;
|
_preloadDownRequest = 0;
|
||||||
|
@ -3381,10 +3510,18 @@ void HistoryWidget::unblockDone(PeerData *peer, const MTPBool &result) {
|
||||||
|
|
||||||
bool HistoryWidget::unblockFail(const RPCError &error) {
|
bool HistoryWidget::unblockFail(const RPCError &error) {
|
||||||
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
||||||
// _unblockRequest = 0;
|
|
||||||
|
_unblockRequest = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::blockDone(PeerData *peer, const MTPBool &result) {
|
||||||
|
if (peer->chat) return;
|
||||||
|
|
||||||
|
peer->asUser()->blocked = UserIsBlocked;
|
||||||
|
emit App::main()->peerUpdated(peer);
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryWidget::onBotStart() {
|
void HistoryWidget::onBotStart() {
|
||||||
if (!_peer || _peer->chat || !_peer->asUser()->botInfo) {
|
if (!_peer || _peer->chat || !_peer->asUser()->botInfo) {
|
||||||
updateControlsVisibility();
|
updateControlsVisibility();
|
||||||
|
@ -3439,7 +3576,7 @@ void HistoryWidget::shareContact(const PeerId &peer, const QString &phone, const
|
||||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||||
}
|
}
|
||||||
h->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(peer), MTPint(), MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities));
|
h->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(peer), MTPint(), MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities));
|
||||||
h->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), p->input, MTP_int(replyTo), MTP_inputMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, h->sendRequestId);
|
h->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), p->input, MTP_int(replyTo), MTP_inputMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, h->sendRequestId);
|
||||||
|
|
||||||
App::historyRegRandom(randomId, newId);
|
App::historyRegRandom(randomId, newId);
|
||||||
|
|
||||||
|
@ -3471,6 +3608,7 @@ void HistoryWidget::animShow(const QPixmap &bgAnimCache, const QPixmap &bgAnimTo
|
||||||
App::main()->topBar()->startAnim();
|
App::main()->topBar()->startAnim();
|
||||||
_scroll.hide();
|
_scroll.hide();
|
||||||
_kbScroll.hide();
|
_kbScroll.hide();
|
||||||
|
_reportSpamPanel.hide();
|
||||||
_toHistoryEnd.hide();
|
_toHistoryEnd.hide();
|
||||||
_attachDocument.hide();
|
_attachDocument.hide();
|
||||||
_attachPhoto.hide();
|
_attachPhoto.hide();
|
||||||
|
@ -3519,6 +3657,7 @@ bool HistoryWidget::showStep(float64 ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::doneShow() {
|
void HistoryWidget::doneShow() {
|
||||||
|
updateReportSpamStatus();
|
||||||
updateBotKeyboard();
|
updateBotKeyboard();
|
||||||
updateControlsVisibility();
|
updateControlsVisibility();
|
||||||
updateListSize(0, true);
|
updateListSize(0, true);
|
||||||
|
@ -4346,7 +4485,7 @@ void HistoryWidget::onPhotoUploaded(MsgId newId, const MTPInputFile &file) {
|
||||||
if (replyTo) {
|
if (replyTo) {
|
||||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||||
}
|
}
|
||||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedPhoto(file, MTP_string("")), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendPhotoFailed, randomId), 0, 0, hist->sendRequestId);
|
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedPhoto(file, MTP_string("")), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendPhotoFail, randomId), 0, 0, hist->sendRequestId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4386,7 +4525,7 @@ void HistoryWidget::onDocumentUploaded(MsgId newId, const MTPInputFile &file) {
|
||||||
if (replyTo) {
|
if (replyTo) {
|
||||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||||
}
|
}
|
||||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedDocument(file, MTP_string(document->mime), _composeDocumentAttributes(document)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId);
|
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedDocument(file, MTP_string(document->mime), _composeDocumentAttributes(document)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4410,7 +4549,7 @@ void HistoryWidget::onThumbDocumentUploaded(MsgId newId, const MTPInputFile &fil
|
||||||
if (replyTo) {
|
if (replyTo) {
|
||||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||||
}
|
}
|
||||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedThumbDocument(file, thumb, MTP_string(document->mime), _composeDocumentAttributes(document)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId);
|
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedThumbDocument(file, thumb, MTP_string(document->mime), _composeDocumentAttributes(document)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4432,7 +4571,7 @@ void HistoryWidget::onAudioUploaded(MsgId newId, const MTPInputFile &file) {
|
||||||
if (replyTo) {
|
if (replyTo) {
|
||||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||||
}
|
}
|
||||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedAudio(file, MTP_int(audio->duration), MTP_string(audio->mime)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId);
|
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedAudio(file, MTP_int(audio->duration), MTP_string(audio->mime)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4494,6 +4633,60 @@ void HistoryWidget::onAudioFailed(MsgId newId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::onReportSpamClicked() {
|
||||||
|
if (_reportSpamRequest) return;
|
||||||
|
|
||||||
|
if (!_peer->chat) MTP::send(MTPcontacts_Block(_peer->asUser()->inputUser), rpcDone(&HistoryWidget::blockDone, _peer), RPCFailHandlerPtr(), 0, 5);
|
||||||
|
_reportSpamRequest = MTP::send(MTPmessages_ReportSpam(_peer->input), rpcDone(&HistoryWidget::reportSpamDone, _peer), rpcFail(&HistoryWidget::reportSpamFail));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::reportSpamDone(PeerData *peer, const MTPBool &result, mtpRequestId req) {
|
||||||
|
if (req == _reportSpamRequest) {
|
||||||
|
_reportSpamRequest = 0;
|
||||||
|
}
|
||||||
|
if (peer) {
|
||||||
|
cRefReportSpamStatuses().insert(peer->id, dbiprsReportSent);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
}
|
||||||
|
_reportSpamStatus = dbiprsReportSent;
|
||||||
|
_reportSpamPanel.setReported(_reportSpamStatus == dbiprsReportSent);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HistoryWidget::reportSpamFail(const RPCError &error, mtpRequestId req) {
|
||||||
|
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
||||||
|
|
||||||
|
if (req == _reportSpamRequest) {
|
||||||
|
_reportSpamRequest = 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::onReportSpamHide() {
|
||||||
|
if (_peer) {
|
||||||
|
cRefReportSpamStatuses().insert(_peer->id, dbiprsNoButton);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
}
|
||||||
|
_reportSpamStatus = dbiprsNoButton;
|
||||||
|
updateControlsVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::onReportSpamClear() {
|
||||||
|
ConfirmBox *box = new ConfirmBox(_peer->chat ? lng_sure_delete_and_exit(lt_group, _peer->name) : lng_sure_delete_history(lt_contact, _peer->name));
|
||||||
|
connect(box, SIGNAL(confirmed()), this, SLOT(onReportSpamClearSure()));
|
||||||
|
App::wnd()->showLayer(box);
|
||||||
|
_clearPeer = _peer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::onReportSpamClearSure() {
|
||||||
|
if (_clearPeer->chat) {
|
||||||
|
App::wnd()->hideLayer();
|
||||||
|
App::main()->showDialogs();
|
||||||
|
MTP::send(MTPmessages_DeleteChatUser(MTP_int(_clearPeer->id & 0xFFFFFFFF), App::self()->inputUser), App::main()->rpcDone(&MainWidget::deleteHistoryAfterLeave, _clearPeer), App::main()->rpcFail(&MainWidget::leaveChatFailed, _clearPeer));
|
||||||
|
} else {
|
||||||
|
App::main()->deleteConversation(_clearPeer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryWidget::peerMessagesUpdated(PeerId peer) {
|
void HistoryWidget::peerMessagesUpdated(PeerId peer) {
|
||||||
if (_peer && _list && peer == _peer->id) {
|
if (_peer && _list && peer == _peer->id) {
|
||||||
updateListSize();
|
updateListSize();
|
||||||
|
@ -4516,6 +4709,8 @@ void HistoryWidget::msgUpdated(PeerId peer, const HistoryItem *msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::resizeEvent(QResizeEvent *e) {
|
void HistoryWidget::resizeEvent(QResizeEvent *e) {
|
||||||
|
_reportSpamPanel.resize(width(), _reportSpamPanel.height());
|
||||||
|
|
||||||
int32 maxKeyboardHeight = int(st::maxFieldHeight) - _field.height();
|
int32 maxKeyboardHeight = int(st::maxFieldHeight) - _field.height();
|
||||||
_keyboard.resizeToWidth(width(), maxKeyboardHeight);
|
_keyboard.resizeToWidth(width(), maxKeyboardHeight);
|
||||||
|
|
||||||
|
@ -4924,7 +5119,7 @@ void HistoryWidget::onStickerSend(DocumentData *sticker) {
|
||||||
}
|
}
|
||||||
_history->addToBackDocument(newId, flags, replyToId(), date(MTP_int(unixtime())), MTP::authedId(), sticker);
|
_history->addToBackDocument(newId, flags, replyToId(), date(MTP_int(unixtime())), MTP::authedId(), sticker);
|
||||||
|
|
||||||
_history->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_inputMediaDocument(MTP_inputDocument(MTP_long(sticker->id), MTP_long(sticker->access))), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, _history->sendRequestId);
|
_history->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_inputMediaDocument(MTP_inputDocument(MTP_long(sticker->id), MTP_long(sticker->access))), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId);
|
||||||
App::main()->finishForwarding(_history);
|
App::main()->finishForwarding(_history);
|
||||||
cancelReply(lastKeyboardUsed);
|
cancelReply(lastKeyboardUsed);
|
||||||
|
|
||||||
|
@ -5167,6 +5362,7 @@ void HistoryWidget::onFullPeerUpdated(PeerData *data) {
|
||||||
int32 newScrollTop = _scroll.scrollTop();
|
int32 newScrollTop = _scroll.scrollTop();
|
||||||
if (_list && data == _peer) {
|
if (_list && data == _peer) {
|
||||||
checkMentionDropdown();
|
checkMentionDropdown();
|
||||||
|
updateReportSpamStatus();
|
||||||
int32 lh = _list->height(), st = _scroll.scrollTop();
|
int32 lh = _list->height(), st = _scroll.scrollTop();
|
||||||
_list->updateBotInfo();
|
_list->updateBotInfo();
|
||||||
newScrollTop = st + _list->height() - lh;
|
newScrollTop = st + _list->height() - lh;
|
||||||
|
|
|
@ -208,6 +208,32 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class HistoryWidget;
|
||||||
|
class ReportSpamPanel : public TWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
ReportSpamPanel(HistoryWidget *parent);
|
||||||
|
|
||||||
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
void paintEvent(QPaintEvent *e);
|
||||||
|
|
||||||
|
void setReported(bool reported);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
void hideClicked();
|
||||||
|
void reportClicked();
|
||||||
|
void clearClicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
FlatButton _report, _hide;
|
||||||
|
LinkButton _clear;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
class BotKeyboard : public QWidget {
|
class BotKeyboard : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -478,6 +504,8 @@ public:
|
||||||
void clearDelayedShowAt();
|
void clearDelayedShowAt();
|
||||||
void clearAllLoadRequests();
|
void clearAllLoadRequests();
|
||||||
|
|
||||||
|
void contactsReceived();
|
||||||
|
|
||||||
~HistoryWidget();
|
~HistoryWidget();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -515,6 +543,11 @@ public slots:
|
||||||
void onDocumentFailed(MsgId msgId);
|
void onDocumentFailed(MsgId msgId);
|
||||||
void onAudioFailed(MsgId msgId);
|
void onAudioFailed(MsgId msgId);
|
||||||
|
|
||||||
|
void onReportSpamClicked();
|
||||||
|
void onReportSpamHide();
|
||||||
|
void onReportSpamClear();
|
||||||
|
void onReportSpamClearSure();
|
||||||
|
|
||||||
void onListScroll();
|
void onListScroll();
|
||||||
void onHistoryToEnd();
|
void onHistoryToEnd();
|
||||||
void onSend(bool ctrlShiftEnter = false, MsgId replyTo = -1);
|
void onSend(bool ctrlShiftEnter = false, MsgId replyTo = -1);
|
||||||
|
@ -585,6 +618,9 @@ private:
|
||||||
void drawRecording(Painter &p);
|
void drawRecording(Painter &p);
|
||||||
void updateField();
|
void updateField();
|
||||||
|
|
||||||
|
DBIPeerReportSpamStatus _reportSpamStatus;
|
||||||
|
void updateReportSpamStatus();
|
||||||
|
|
||||||
QString _previewLinks;
|
QString _previewLinks;
|
||||||
WebPageData *_previewData;
|
WebPageData *_previewData;
|
||||||
typedef QMap<QString, WebPageId> PreviewCache;
|
typedef QMap<QString, WebPageId> PreviewCache;
|
||||||
|
@ -605,8 +641,12 @@ private:
|
||||||
void addMessagesToFront(const QVector<MTPMessage> &messages);
|
void addMessagesToFront(const QVector<MTPMessage> &messages);
|
||||||
void addMessagesToBack(const QVector<MTPMessage> &messages);
|
void addMessagesToBack(const QVector<MTPMessage> &messages);
|
||||||
|
|
||||||
|
void reportSpamDone(PeerData *peer, const MTPBool &result, mtpRequestId request);
|
||||||
|
bool reportSpamFail(const RPCError &error, mtpRequestId request);
|
||||||
|
|
||||||
void unblockDone(PeerData *peer, const MTPBool &result);
|
void unblockDone(PeerData *peer, const MTPBool &result);
|
||||||
bool unblockFail(const RPCError &error);
|
bool unblockFail(const RPCError &error);
|
||||||
|
void blockDone(PeerData *peer, const MTPBool &result);
|
||||||
|
|
||||||
void countHistoryShowFrom();
|
void countHistoryShowFrom();
|
||||||
|
|
||||||
|
@ -624,7 +664,7 @@ private:
|
||||||
|
|
||||||
void updateDragAreas();
|
void updateDragAreas();
|
||||||
|
|
||||||
PeerData *_peer;
|
PeerData *_peer, *_clearPeer; // cache _peer in _clearPeer when showing clear history box
|
||||||
MsgId _showAtMsgId;
|
MsgId _showAtMsgId;
|
||||||
|
|
||||||
mtpRequestId _firstLoadRequest, _preloadRequest, _preloadDownRequest;
|
mtpRequestId _firstLoadRequest, _preloadRequest, _preloadDownRequest;
|
||||||
|
@ -647,8 +687,10 @@ private:
|
||||||
bool isBlocked() const;
|
bool isBlocked() const;
|
||||||
bool updateCmdStartShown();
|
bool updateCmdStartShown();
|
||||||
|
|
||||||
|
ReportSpamPanel _reportSpamPanel;
|
||||||
|
|
||||||
FlatButton _send, _unblock, _botStart;
|
FlatButton _send, _unblock, _botStart;
|
||||||
mtpRequestId _unblockRequest;
|
mtpRequestId _unblockRequest, _reportSpamRequest;
|
||||||
IconedButton _attachDocument, _attachPhoto, _attachEmoji, _kbShow, _kbHide, _cmdStart;
|
IconedButton _attachDocument, _attachPhoto, _attachEmoji, _kbShow, _kbHide, _cmdStart;
|
||||||
bool _cmdStartShown;
|
bool _cmdStartShown;
|
||||||
MessageField _field;
|
MessageField _field;
|
||||||
|
|
|
@ -495,19 +495,20 @@ namespace {
|
||||||
FileKey _dataNameKey = 0;
|
FileKey _dataNameKey = 0;
|
||||||
|
|
||||||
enum { // Local Storage Keys
|
enum { // Local Storage Keys
|
||||||
lskUserMap = 0x00,
|
lskUserMap = 0x00,
|
||||||
lskDraft = 0x01, // data: PeerId peer
|
lskDraft = 0x01, // data: PeerId peer
|
||||||
lskDraftPosition = 0x02, // data: PeerId peer
|
lskDraftPosition = 0x02, // data: PeerId peer
|
||||||
lskImages = 0x03, // data: StorageKey location
|
lskImages = 0x03, // data: StorageKey location
|
||||||
lskLocations = 0x04, // no data
|
lskLocations = 0x04, // no data
|
||||||
lskStickerImages = 0x05, // data: StorageKey location
|
lskStickerImages = 0x05, // data: StorageKey location
|
||||||
lskAudios = 0x06, // data: StorageKey location
|
lskAudios = 0x06, // data: StorageKey location
|
||||||
lskRecentStickersOld = 0x07, // no data
|
lskRecentStickersOld = 0x07, // no data
|
||||||
lskBackground = 0x08, // no data
|
lskBackground = 0x08, // no data
|
||||||
lskUserSettings = 0x09, // no data
|
lskUserSettings = 0x09, // no data
|
||||||
lskRecentHashtags = 0x0a, // no data
|
lskRecentHashtags = 0x0a, // no data
|
||||||
lskStickers = 0x0b, // no data
|
lskStickers = 0x0b, // no data
|
||||||
lskSavedPeers = 0x0c, // no data
|
lskSavedPeers = 0x0c, // no data
|
||||||
|
lskReportSpamStatuses = 0x0d, // no data
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QMap<PeerId, FileKey> DraftsMap;
|
typedef QMap<PeerId, FileKey> DraftsMap;
|
||||||
|
@ -522,7 +523,7 @@ namespace {
|
||||||
FileLocationPairs _fileLocationPairs;
|
FileLocationPairs _fileLocationPairs;
|
||||||
typedef QMap<MediaKey, MediaKey> FileLocationAliases;
|
typedef QMap<MediaKey, MediaKey> FileLocationAliases;
|
||||||
FileLocationAliases _fileLocationAliases;
|
FileLocationAliases _fileLocationAliases;
|
||||||
FileKey _locationsKey = 0;
|
FileKey _locationsKey = 0, _reportSpamStatusesKey = 0;
|
||||||
|
|
||||||
FileKey _recentStickersKeyOld = 0, _stickersKey = 0;
|
FileKey _recentStickersKeyOld = 0, _stickersKey = 0;
|
||||||
|
|
||||||
|
@ -550,7 +551,7 @@ namespace {
|
||||||
};
|
};
|
||||||
|
|
||||||
void _writeMap(WriteMapWhen when = WriteMapSoon);
|
void _writeMap(WriteMapWhen when = WriteMapSoon);
|
||||||
|
|
||||||
void _writeLocations(WriteMapWhen when = WriteMapSoon) {
|
void _writeLocations(WriteMapWhen when = WriteMapSoon) {
|
||||||
if (when != WriteMapNow) {
|
if (when != WriteMapNow) {
|
||||||
_manager->writeLocations(when == WriteMapFast);
|
_manager->writeLocations(when == WriteMapFast);
|
||||||
|
@ -643,6 +644,63 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _writeReportSpamStatuses() {
|
||||||
|
if (!_working()) return;
|
||||||
|
|
||||||
|
if (cReportSpamStatuses().isEmpty()) {
|
||||||
|
if (_reportSpamStatusesKey) {
|
||||||
|
clearKey(_reportSpamStatusesKey);
|
||||||
|
_reportSpamStatusesKey = 0;
|
||||||
|
_mapChanged = true;
|
||||||
|
_writeMap();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!_reportSpamStatusesKey) {
|
||||||
|
_reportSpamStatusesKey = genKey();
|
||||||
|
_mapChanged = true;
|
||||||
|
_writeMap(WriteMapFast);
|
||||||
|
}
|
||||||
|
const ReportSpamStatuses &statuses(cReportSpamStatuses());
|
||||||
|
|
||||||
|
quint32 size = sizeof(qint32);
|
||||||
|
for (ReportSpamStatuses::const_iterator i = statuses.cbegin(), e = statuses.cend(); i != e; ++i) {
|
||||||
|
// peer + status
|
||||||
|
size += sizeof(quint64) + sizeof(qint32);
|
||||||
|
}
|
||||||
|
|
||||||
|
EncryptedDescriptor data(size);
|
||||||
|
data.stream << qint32(statuses.size());
|
||||||
|
for (ReportSpamStatuses::const_iterator i = statuses.cbegin(), e = statuses.cend(); i != e; ++i) {
|
||||||
|
data.stream << quint64(i.key()) << qint32(i.value());
|
||||||
|
}
|
||||||
|
|
||||||
|
FileWriteDescriptor file(_reportSpamStatusesKey);
|
||||||
|
file.writeEncrypted(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _readReportSpamStatuses() {
|
||||||
|
FileReadDescriptor statuses;
|
||||||
|
if (!readEncryptedFile(statuses, _reportSpamStatusesKey)) {
|
||||||
|
clearKey(_reportSpamStatusesKey);
|
||||||
|
_reportSpamStatusesKey = 0;
|
||||||
|
_writeMap();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReportSpamStatuses &map(cRefReportSpamStatuses());
|
||||||
|
map.clear();
|
||||||
|
|
||||||
|
qint32 size = 0;
|
||||||
|
statuses.stream >> size;
|
||||||
|
for (int32 i = 0; i < size; ++i) {
|
||||||
|
quint64 peer = 0;
|
||||||
|
qint32 status = 0;
|
||||||
|
statuses.stream >> peer >> status;
|
||||||
|
map.insert(peer, DBIPeerReportSpamStatus(status));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mtpDcOptions *_dcOpts = 0;
|
mtpDcOptions *_dcOpts = 0;
|
||||||
bool _readSetting(quint32 blockId, QDataStream &stream, int version) {
|
bool _readSetting(quint32 blockId, QDataStream &stream, int version) {
|
||||||
switch (blockId) {
|
switch (blockId) {
|
||||||
|
@ -1458,7 +1516,7 @@ namespace {
|
||||||
DraftsNotReadMap draftsNotReadMap;
|
DraftsNotReadMap draftsNotReadMap;
|
||||||
StorageMap imagesMap, stickerImagesMap, audiosMap;
|
StorageMap imagesMap, stickerImagesMap, audiosMap;
|
||||||
qint64 storageImagesSize = 0, storageStickersSize = 0, storageAudiosSize = 0;
|
qint64 storageImagesSize = 0, storageStickersSize = 0, storageAudiosSize = 0;
|
||||||
quint64 locationsKey = 0, recentStickersKeyOld = 0, stickersKey = 0, backgroundKey = 0, userSettingsKey = 0, recentHashtagsKey = 0, savedPeersKey = 0;
|
quint64 locationsKey = 0, reportSpamStatusesKey = 0, recentStickersKeyOld = 0, stickersKey = 0, backgroundKey = 0, userSettingsKey = 0, recentHashtagsKey = 0, savedPeersKey = 0;
|
||||||
while (!map.stream.atEnd()) {
|
while (!map.stream.atEnd()) {
|
||||||
quint32 keyType;
|
quint32 keyType;
|
||||||
map.stream >> keyType;
|
map.stream >> keyType;
|
||||||
|
@ -1523,6 +1581,9 @@ namespace {
|
||||||
case lskLocations: {
|
case lskLocations: {
|
||||||
map.stream >> locationsKey;
|
map.stream >> locationsKey;
|
||||||
} break;
|
} break;
|
||||||
|
case lskReportSpamStatuses: {
|
||||||
|
map.stream >> reportSpamStatusesKey;
|
||||||
|
} break;
|
||||||
case lskRecentStickersOld: {
|
case lskRecentStickersOld: {
|
||||||
map.stream >> recentStickersKeyOld;
|
map.stream >> recentStickersKeyOld;
|
||||||
} break;
|
} break;
|
||||||
|
@ -1562,6 +1623,7 @@ namespace {
|
||||||
_storageAudiosSize = storageAudiosSize;
|
_storageAudiosSize = storageAudiosSize;
|
||||||
|
|
||||||
_locationsKey = locationsKey;
|
_locationsKey = locationsKey;
|
||||||
|
_reportSpamStatusesKey = reportSpamStatusesKey;
|
||||||
_recentStickersKeyOld = recentStickersKeyOld;
|
_recentStickersKeyOld = recentStickersKeyOld;
|
||||||
_stickersKey = stickersKey;
|
_stickersKey = stickersKey;
|
||||||
_savedPeersKey = savedPeersKey;
|
_savedPeersKey = savedPeersKey;
|
||||||
|
@ -1579,6 +1641,9 @@ namespace {
|
||||||
if (_locationsKey) {
|
if (_locationsKey) {
|
||||||
_readLocations();
|
_readLocations();
|
||||||
}
|
}
|
||||||
|
if (_reportSpamStatusesKey) {
|
||||||
|
_readReportSpamStatuses();
|
||||||
|
}
|
||||||
|
|
||||||
_readUserSettings();
|
_readUserSettings();
|
||||||
_readMtpData();
|
_readMtpData();
|
||||||
|
@ -1630,6 +1695,7 @@ namespace {
|
||||||
if (!_stickerImagesMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _stickerImagesMap.size() * (sizeof(quint64) * 3 + sizeof(qint32));
|
if (!_stickerImagesMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _stickerImagesMap.size() * (sizeof(quint64) * 3 + sizeof(qint32));
|
||||||
if (!_audiosMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _audiosMap.size() * (sizeof(quint64) * 3 + sizeof(qint32));
|
if (!_audiosMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _audiosMap.size() * (sizeof(quint64) * 3 + sizeof(qint32));
|
||||||
if (_locationsKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
if (_locationsKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
||||||
|
if (_reportSpamStatusesKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
||||||
if (_recentStickersKeyOld) mapSize += sizeof(quint32) + sizeof(quint64);
|
if (_recentStickersKeyOld) mapSize += sizeof(quint32) + sizeof(quint64);
|
||||||
if (_stickersKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
if (_stickersKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
||||||
if (_savedPeersKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
if (_savedPeersKey) mapSize += sizeof(quint32) + sizeof(quint64);
|
||||||
|
@ -1670,6 +1736,9 @@ namespace {
|
||||||
if (_locationsKey) {
|
if (_locationsKey) {
|
||||||
mapData.stream << quint32(lskLocations) << quint64(_locationsKey);
|
mapData.stream << quint32(lskLocations) << quint64(_locationsKey);
|
||||||
}
|
}
|
||||||
|
if (_reportSpamStatusesKey) {
|
||||||
|
mapData.stream << quint32(lskReportSpamStatuses) << quint64(_reportSpamStatusesKey);
|
||||||
|
}
|
||||||
if (_recentStickersKeyOld) {
|
if (_recentStickersKeyOld) {
|
||||||
mapData.stream << quint32(lskRecentStickersOld) << quint64(_recentStickersKeyOld);
|
mapData.stream << quint32(lskRecentStickersOld) << quint64(_recentStickersKeyOld);
|
||||||
}
|
}
|
||||||
|
@ -1938,7 +2007,7 @@ namespace Local {
|
||||||
_draftsNotReadMap.clear();
|
_draftsNotReadMap.clear();
|
||||||
_stickerImagesMap.clear();
|
_stickerImagesMap.clear();
|
||||||
_audiosMap.clear();
|
_audiosMap.clear();
|
||||||
_locationsKey = _recentStickersKeyOld = _stickersKey = _backgroundKey = _userSettingsKey = _recentHashtagsKey = _savedPeersKey = 0;
|
_locationsKey = _reportSpamStatusesKey = _recentStickersKeyOld = _stickersKey = _backgroundKey = _userSettingsKey = _recentHashtagsKey = _savedPeersKey = 0;
|
||||||
_mapChanged = true;
|
_mapChanged = true;
|
||||||
_writeMap(WriteMapNow);
|
_writeMap(WriteMapNow);
|
||||||
|
|
||||||
|
@ -2944,6 +3013,10 @@ namespace Local {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void writeReportSpamStatuses() {
|
||||||
|
_writeReportSpamStatuses();
|
||||||
|
}
|
||||||
|
|
||||||
struct ClearManagerData {
|
struct ClearManagerData {
|
||||||
QThread *thread;
|
QThread *thread;
|
||||||
StorageMap images, stickers, audios;
|
StorageMap images, stickers, audios;
|
||||||
|
@ -2991,6 +3064,10 @@ namespace Local {
|
||||||
_locationsKey = 0;
|
_locationsKey = 0;
|
||||||
_mapChanged = true;
|
_mapChanged = true;
|
||||||
}
|
}
|
||||||
|
if (_reportSpamStatusesKey) {
|
||||||
|
_reportSpamStatusesKey = 0;
|
||||||
|
_mapChanged = true;
|
||||||
|
}
|
||||||
if (_recentStickersKeyOld) {
|
if (_recentStickersKeyOld) {
|
||||||
_recentStickersKeyOld = 0;
|
_recentStickersKeyOld = 0;
|
||||||
_mapChanged = true;
|
_mapChanged = true;
|
||||||
|
|
|
@ -147,4 +147,6 @@ namespace Local {
|
||||||
void removeSavedPeer(PeerData *peer);
|
void removeSavedPeer(PeerData *peer);
|
||||||
void readSavedPeers();
|
void readSavedPeers();
|
||||||
|
|
||||||
|
void writeReportSpamStatuses();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -760,7 +760,12 @@ void MainWidget::deleteHistoryPart(PeerData *peer, const MTPmessages_AffectedHis
|
||||||
updPtsUpdated(d.vpts.v, d.vpts_count.v);
|
updPtsUpdated(d.vpts.v, d.vpts_count.v);
|
||||||
|
|
||||||
int32 offset = d.voffset.v;
|
int32 offset = d.voffset.v;
|
||||||
if (!MTP::authedId() || offset <= 0) return;
|
if (!MTP::authedId()) return;
|
||||||
|
if (offset <= 0) {
|
||||||
|
cRefReportSpamStatuses().remove(peer->id);
|
||||||
|
Local::writeReportSpamStatuses();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MTP::send(MTPmessages_DeleteHistory(peer->input, d.voffset), rpcDone(&MainWidget::deleteHistoryPart, peer));
|
MTP::send(MTPmessages_DeleteHistory(peer->input, d.voffset), rpcDone(&MainWidget::deleteHistoryPart, peer));
|
||||||
}
|
}
|
||||||
|
@ -817,6 +822,8 @@ bool MainWidget::addParticipantFail(UserData *user, const RPCError &error) {
|
||||||
text = lang(lng_failed_add_not_mutual);
|
text = lang(lng_failed_add_not_mutual);
|
||||||
} else if (error.type() == "USER_ALREADY_PARTICIPANT" && user->botInfo) {
|
} else if (error.type() == "USER_ALREADY_PARTICIPANT" && user->botInfo) {
|
||||||
text = lang(lng_bot_already_in_group);
|
text = lang(lng_bot_already_in_group);
|
||||||
|
} else if (error.type() == "PEER_FLOOD") {
|
||||||
|
text = lng_cant_invite_not_contact(lt_more_info, QString());
|
||||||
}
|
}
|
||||||
App::wnd()->showLayer(new ConfirmBox(text, true));
|
App::wnd()->showLayer(new ConfirmBox(text, true));
|
||||||
return false;
|
return false;
|
||||||
|
@ -872,7 +879,7 @@ void MainWidget::checkedHistory(PeerData *peer, const MTPmessages_Messages &resu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWidget::sendPhotoFailed(uint64 randomId, const RPCError &error) {
|
bool MainWidget::sendPhotoFail(uint64 randomId, const RPCError &error) {
|
||||||
if (mtpIsFlood(error)) return false;
|
if (mtpIsFlood(error)) return false;
|
||||||
|
|
||||||
if (error.type() == qsl("PHOTO_INVALID_DIMENSIONS")) {
|
if (error.type() == qsl("PHOTO_INVALID_DIMENSIONS")) {
|
||||||
|
@ -886,6 +893,16 @@ bool MainWidget::sendPhotoFailed(uint64 randomId, const RPCError &error) {
|
||||||
_resendImgRandomIds.push_back(randomId);
|
_resendImgRandomIds.push_back(randomId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return sendMessageFail(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MainWidget::sendMessageFail(const RPCError &error) {
|
||||||
|
if (mtpIsFlood(error)) return false;
|
||||||
|
|
||||||
|
if (error.type() == qsl("PEER_FLOOD")) {
|
||||||
|
App::wnd()->showLayer(new ConfirmBox(lng_cant_send_to_not_contact(lt_more_info, QString()), true));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1068,7 +1085,7 @@ void MainWidget::sendPreparedText(History *hist, const QString &text, MsgId repl
|
||||||
}
|
}
|
||||||
MTPVector<MTPMessageEntity> localEntities = linksToMTP(textParseLinks(sendingText, itemTextParseOptions(hist, App::self()).flags));
|
MTPVector<MTPMessageEntity> localEntities = linksToMTP(textParseLinks(sendingText, itemTextParseOptions(hist, App::self()).flags));
|
||||||
hist->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(hist->peer->id), MTPint(), MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities));
|
hist->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(hist->peer->id), MTPint(), MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities));
|
||||||
hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_int(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, localEntities), App::main()->rpcDone(&MainWidget::sentUpdatesReceived, randomId), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId);
|
hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_int(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, localEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
finishForwarding(hist);
|
finishForwarding(hist);
|
||||||
|
@ -1967,6 +1984,10 @@ void MainWidget::clearBotStartToken(PeerData *peer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWidget::contactsReceived() {
|
||||||
|
history.contactsReceived();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWidget::showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool back) {
|
void MainWidget::showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool back) {
|
||||||
if (!back && (!peerId || (_stack.size() == 1 && _stack[0]->type() == HistoryStackItem && _stack[0]->peer->id == peerId))) {
|
if (!back && (!peerId || (_stack.size() == 1 && _stack[0]->type() == HistoryStackItem && _stack[0]->peer->id == peerId))) {
|
||||||
back = true;
|
back = true;
|
||||||
|
@ -3551,6 +3572,10 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
|
||||||
|
|
||||||
case mtpc_updateWebPage: {
|
case mtpc_updateWebPage: {
|
||||||
const MTPDupdateWebPage &d(update.c_updateWebPage());
|
const MTPDupdateWebPage &d(update.c_updateWebPage());
|
||||||
|
if (!updPtsUpdated(d.vpts.v, d.vpts_count.v)) {
|
||||||
|
_byPtsUpdate.insert(ptsKey(SkippedUpdate), update);
|
||||||
|
return;
|
||||||
|
}
|
||||||
App::feedWebPage(d.vwebpage);
|
App::feedWebPage(d.vwebpage);
|
||||||
history.updatePreview();
|
history.updatePreview();
|
||||||
webPagesUpdate();
|
webPagesUpdate();
|
||||||
|
|
|
@ -300,7 +300,8 @@ public:
|
||||||
void checkPeerHistory(PeerData *peer);
|
void checkPeerHistory(PeerData *peer);
|
||||||
void checkedHistory(PeerData *peer, const MTPmessages_Messages &result);
|
void checkedHistory(PeerData *peer, const MTPmessages_Messages &result);
|
||||||
|
|
||||||
bool sendPhotoFailed(uint64 randomId, const RPCError &e);
|
bool sendPhotoFail(uint64 randomId, const RPCError &e);
|
||||||
|
bool sendMessageFail(const RPCError &error);
|
||||||
|
|
||||||
void forwardSelectedItems();
|
void forwardSelectedItems();
|
||||||
void deleteSelectedItems();
|
void deleteSelectedItems();
|
||||||
|
@ -377,6 +378,8 @@ public:
|
||||||
void choosePeer(PeerId peerId, MsgId showAtMsgId); // does offerPeer or showPeerHistory
|
void choosePeer(PeerId peerId, MsgId showAtMsgId); // does offerPeer or showPeerHistory
|
||||||
void clearBotStartToken(PeerData *peer);
|
void clearBotStartToken(PeerData *peer);
|
||||||
|
|
||||||
|
void contactsReceived();
|
||||||
|
|
||||||
~MainWidget();
|
~MainWidget();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -206,11 +206,15 @@ void MediaView::updateDocSize() {
|
||||||
readyStr = QString::number(readyTenthMb / 10) + '.' + QString::number(readyTenthMb % 10);
|
readyStr = QString::number(readyTenthMb / 10) + '.' + QString::number(readyTenthMb % 10);
|
||||||
totalStr = QString::number(totalTenthMb / 10) + '.' + QString::number(totalTenthMb % 10);
|
totalStr = QString::number(totalTenthMb / 10) + '.' + QString::number(totalTenthMb % 10);
|
||||||
mb = qsl("MB");
|
mb = qsl("MB");
|
||||||
} else {
|
} else if (total >= 1024) {
|
||||||
qint64 readyKb = (ready / 1024), totalKb = (total / 1024);
|
qint64 readyKb = (ready / 1024), totalKb = (total / 1024);
|
||||||
readyStr = QString::number(readyKb);
|
readyStr = QString::number(readyKb);
|
||||||
totalStr = QString::number(totalKb);
|
totalStr = QString::number(totalKb);
|
||||||
mb = qsl("KB");
|
mb = qsl("KB");
|
||||||
|
} else {
|
||||||
|
readyStr = QString::number(ready);
|
||||||
|
totalStr = QString::number(total);
|
||||||
|
mb = qsl("B");
|
||||||
}
|
}
|
||||||
_docSize = lng_media_save_progress(lt_ready, readyStr, lt_total, totalStr, lt_mb, mb);
|
_docSize = lng_media_save_progress(lt_ready, readyStr, lt_total, totalStr, lt_mb, mb);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -366,7 +366,7 @@ static const mtpTypeId mtpLayers[] = {
|
||||||
mtpc_invokeWithLayer17,
|
mtpc_invokeWithLayer17,
|
||||||
mtpc_invokeWithLayer18,
|
mtpc_invokeWithLayer18,
|
||||||
}, mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]);
|
}, mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]);
|
||||||
static const mtpPrime mtpCurrentLayer = 36;
|
static const mtpPrime mtpCurrentLayer = 37;
|
||||||
|
|
||||||
template <typename bareT>
|
template <typename bareT>
|
||||||
class MTPBoxed : public bareT {
|
class MTPBoxed : public bareT {
|
||||||
|
|
|
@ -1256,7 +1256,9 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
to.add("\n").addSpaces(lev);
|
to.add("\n").addSpaces(lev);
|
||||||
}
|
}
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" self_participant: "); ++stages.back(); if (flag & MTPDchatParticipantsForbidden::flag_self_participant) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break;
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2451,7 +2453,8 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
case 1: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 1: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
case 2: to.add(" inviter_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 2: to.add(" inviter_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
case 3: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 3: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 4: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2597,6 +2600,8 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0: to.add(" webpage: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 0: to.add(" webpage: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4496,6 +4501,20 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_auth_sendSms:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ auth_sendSms");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" phone_code_hash: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_account_registerDevice:
|
case mtpc_account_registerDevice:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -4560,158 +4579,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_contacts_deleteContacts:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ contacts_deleteContacts");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_contacts_block:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ contacts_block");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_contacts_unblock:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ contacts_unblock");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_setTyping:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ messages_setTyping");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_upload_saveFilePart:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ upload_saveFilePart");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_help_saveAppLog:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ help_saveAppLog");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" events: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_discardEncryption:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ messages_discardEncryption");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_setEncryptedTyping:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ messages_setEncryptedTyping");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" typing: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_readEncryptedHistory:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ messages_readEncryptedHistory");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" max_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_upload_saveBigFilePart:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ upload_saveBigFilePart");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" file_total_parts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 3: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_auth_sendSms:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ auth_sendSms");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" phone_code_hash: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_checkUsername:
|
case mtpc_account_checkUsername:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -4791,6 +4658,113 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_deleteContacts:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_deleteContacts");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_block:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_block");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_unblock:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_unblock");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_messages_setTyping:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ messages_setTyping");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_messages_reportSpam:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ messages_reportSpam");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_messages_discardEncryption:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ messages_discardEncryption");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_messages_setEncryptedTyping:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ messages_setEncryptedTyping");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" typing: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_messages_readEncryptedHistory:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ messages_readEncryptedHistory");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" max_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_messages_installStickerSet:
|
case mtpc_messages_installStickerSet:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -4818,6 +4792,50 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_upload_saveFilePart:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ upload_saveFilePart");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_upload_saveBigFilePart:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ upload_saveBigFilePart");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" file_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" file_part: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" file_total_parts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 3: to.add(" bytes: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_saveAppLog:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ help_saveAppLog");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" events: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_invokeAfterMsg:
|
case mtpc_invokeAfterMsg:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5022,6 +5040,10 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_auth_requestPasswordRecovery:
|
||||||
|
to.add("{ auth_requestPasswordRecovery }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_account_getNotifySettings:
|
case mtpc_account_getNotifySettings:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5049,19 +5071,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_contacts_importCard:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ contacts_importCard");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" export_card: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_updateUsername:
|
case mtpc_account_updateUsername:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5075,19 +5084,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_contacts_resolveUsername:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ contacts_resolveUsername");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" username: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_changePhone:
|
case mtpc_account_changePhone:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5103,10 +5099,101 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_importCard:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_importCard");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" export_card: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_resolveUsername:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_resolveUsername");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" username: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_account_getWallPapers:
|
case mtpc_account_getWallPapers:
|
||||||
to.add("{ account_getWallPapers }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
to.add("{ account_getWallPapers }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_getPrivacy:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ account_getPrivacy");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_setPrivacy:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ account_setPrivacy");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" rules: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_getAccountTTL:
|
||||||
|
to.add("{ account_getAccountTTL }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_sendChangePhoneCode:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ account_sendChangePhoneCode");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_getAuthorizations:
|
||||||
|
to.add("{ account_getAuthorizations }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_getPassword:
|
||||||
|
to.add("{ account_getPassword }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_account_getPasswordSettings:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ account_getPasswordSettings");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" current_password_hash: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_users_getUsers:
|
case mtpc_users_getUsers:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5208,6 +5295,20 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
to.add("{ contacts_exportCard }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
to.add("{ contacts_exportCard }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_contacts_search:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ contacts_search");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" q: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_messages_getMessages:
|
case mtpc_messages_getMessages:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5549,149 +5650,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_updates_getState:
|
|
||||||
to.add("{ updates_getState }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_updates_getDifference:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ updates_getDifference");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_photos_updateProfilePhoto:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ photos_updateProfilePhoto");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_photos_uploadProfilePhoto:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ photos_uploadProfilePhoto");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" geo_point: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 3: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_photos_deletePhotos:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ photos_deletePhotos");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_receivedQueue:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ messages_receivedQueue");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" max_qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_upload_getFile:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ upload_getFile");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" location: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_help_getConfig:
|
|
||||||
to.add("{ help_getConfig }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_help_getNearestDc:
|
|
||||||
to.add("{ help_getNearestDc }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_help_getAppUpdate:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ help_getAppUpdate");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" device_model: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" system_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" app_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 3: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_help_getInviteText:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ help_getInviteText");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_photos_getUserPhotos:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ photos_getUserPhotos");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" user_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 2: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_getDhConfig:
|
case mtpc_messages_getDhConfig:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5782,64 +5740,28 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_help_getSupport:
|
case mtpc_messages_receivedQueue:
|
||||||
to.add("{ help_getSupport }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_contacts_search:
|
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
} else {
|
} else {
|
||||||
to.add("{ contacts_search");
|
to.add("{ messages_receivedQueue");
|
||||||
to.add("\n").addSpaces(lev);
|
to.add("\n").addSpaces(lev);
|
||||||
}
|
}
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0: to.add(" q: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 0: to.add(" max_qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
case 1: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_account_getPrivacy:
|
case mtpc_photos_deletePhotos:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
} else {
|
} else {
|
||||||
to.add("{ account_getPrivacy");
|
to.add("{ photos_deletePhotos");
|
||||||
to.add("\n").addSpaces(lev);
|
to.add("\n").addSpaces(lev);
|
||||||
}
|
}
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
case 0: to.add(" id: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_setPrivacy:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ account_setPrivacy");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" key: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
case 1: to.add(" rules: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_getAccountTTL:
|
|
||||||
to.add("{ account_getAccountTTL }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_sendChangePhoneCode:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ account_sendChangePhoneCode");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" phone_number: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -5884,31 +5806,6 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mtpc_account_getAuthorizations:
|
|
||||||
to.add("{ account_getAuthorizations }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_getPassword:
|
|
||||||
to.add("{ account_getPassword }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_account_getPasswordSettings:
|
|
||||||
if (stage) {
|
|
||||||
to.add(",\n").addSpaces(lev);
|
|
||||||
} else {
|
|
||||||
to.add("{ account_getPasswordSettings");
|
|
||||||
to.add("\n").addSpaces(lev);
|
|
||||||
}
|
|
||||||
switch (stage) {
|
|
||||||
case 0: to.add(" current_password_hash: "); ++stages.back(); types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
|
||||||
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_auth_requestPasswordRecovery:
|
|
||||||
to.add("{ auth_requestPasswordRecovery }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mtpc_messages_exportChatInvite:
|
case mtpc_messages_exportChatInvite:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
@ -5948,6 +5845,127 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case mtpc_updates_getState:
|
||||||
|
to.add("{ updates_getState }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_updates_getDifference:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ updates_getDifference");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" qts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_photos_updateProfilePhoto:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ photos_updateProfilePhoto");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_photos_uploadProfilePhoto:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ photos_uploadProfilePhoto");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" geo_point: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 3: to.add(" crop: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_photos_getUserPhotos:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ photos_getUserPhotos");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" user_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_upload_getFile:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ upload_getFile");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" location: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_getConfig:
|
||||||
|
to.add("{ help_getConfig }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_getNearestDc:
|
||||||
|
to.add("{ help_getNearestDc }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_getAppUpdate:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ help_getAppUpdate");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" device_model: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 1: to.add(" system_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 2: to.add(" app_version: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
case 3: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_getInviteText:
|
||||||
|
if (stage) {
|
||||||
|
to.add(",\n").addSpaces(lev);
|
||||||
|
} else {
|
||||||
|
to.add("{ help_getInviteText");
|
||||||
|
to.add("\n").addSpaces(lev);
|
||||||
|
}
|
||||||
|
switch (stage) {
|
||||||
|
case 0: to.add(" lang_code: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break;
|
||||||
|
default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case mtpc_help_getSupport:
|
||||||
|
to.add("{ help_getSupport }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back();
|
||||||
|
break;
|
||||||
|
|
||||||
case mtpc_help_getAppChangelog:
|
case mtpc_help_getAppChangelog:
|
||||||
if (stage) {
|
if (stage) {
|
||||||
to.add(",\n").addSpaces(lev);
|
to.add(",\n").addSpaces(lev);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -126,6 +126,7 @@ register.saveDeveloperInfo#9a5f6e95 name:string email:string phone_number:string
|
||||||
|
|
||||||
---types---
|
---types---
|
||||||
|
|
||||||
|
|
||||||
error#c4b9f9bb code:int text:string = Error;
|
error#c4b9f9bb code:int text:string = Error;
|
||||||
|
|
||||||
null#56730bcc = Null;
|
null#56730bcc = Null;
|
||||||
|
@ -133,13 +134,16 @@ null#56730bcc = Null;
|
||||||
inputPeerEmpty#7f3b18ea = InputPeer;
|
inputPeerEmpty#7f3b18ea = InputPeer;
|
||||||
inputPeerSelf#7da07ec9 = InputPeer;
|
inputPeerSelf#7da07ec9 = InputPeer;
|
||||||
inputPeerChat#179be863 chat_id:int = InputPeer;
|
inputPeerChat#179be863 chat_id:int = InputPeer;
|
||||||
|
inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer;
|
||||||
|
|
||||||
inputUserEmpty#b98886cf = InputUser;
|
inputUserEmpty#b98886cf = InputUser;
|
||||||
inputUserSelf#f7c1b13f = InputUser;
|
inputUserSelf#f7c1b13f = InputUser;
|
||||||
|
inputUser#d8292816 user_id:int access_hash:long = InputUser;
|
||||||
|
|
||||||
inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact;
|
inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact;
|
||||||
|
|
||||||
inputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile;
|
inputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile;
|
||||||
|
inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile;
|
||||||
|
|
||||||
inputMediaEmpty#9664f57f = InputMedia;
|
inputMediaEmpty#9664f57f = InputMedia;
|
||||||
inputMediaUploadedPhoto#f7aff1c0 file:InputFile caption:string = InputMedia;
|
inputMediaUploadedPhoto#f7aff1c0 file:InputFile caption:string = InputMedia;
|
||||||
|
@ -149,6 +153,12 @@ inputMediaContact#a6e45987 phone_number:string first_name:string last_name:strin
|
||||||
inputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;
|
inputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;
|
||||||
inputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;
|
inputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;
|
||||||
inputMediaVideo#936a4ebd id:InputVideo caption:string = InputMedia;
|
inputMediaVideo#936a4ebd id:InputVideo caption:string = InputMedia;
|
||||||
|
inputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia;
|
||||||
|
inputMediaAudio#89938781 id:InputAudio = InputMedia;
|
||||||
|
inputMediaUploadedDocument#ffe76b78 file:InputFile mime_type:string attributes:Vector<DocumentAttribute> = InputMedia;
|
||||||
|
inputMediaUploadedThumbDocument#41481486 file:InputFile thumb:InputFile mime_type:string attributes:Vector<DocumentAttribute> = InputMedia;
|
||||||
|
inputMediaDocument#d184e841 id:InputDocument = InputMedia;
|
||||||
|
inputMediaVenue#2827a81a geo_point:InputGeoPoint title:string address:string provider:string venue_id:string = InputMedia;
|
||||||
|
|
||||||
inputChatPhotoEmpty#1ca48f57 = InputChatPhoto;
|
inputChatPhotoEmpty#1ca48f57 = InputChatPhoto;
|
||||||
inputChatUploadedPhoto#94254732 file:InputFile crop:InputPhotoCrop = InputChatPhoto;
|
inputChatUploadedPhoto#94254732 file:InputFile crop:InputPhotoCrop = InputChatPhoto;
|
||||||
|
@ -165,6 +175,9 @@ inputVideo#ee579652 id:long access_hash:long = InputVideo;
|
||||||
|
|
||||||
inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation;
|
inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation;
|
||||||
inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation;
|
inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation;
|
||||||
|
inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;
|
||||||
|
inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation;
|
||||||
|
inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation;
|
||||||
|
|
||||||
inputPhotoCropAuto#ade6b004 = InputPhotoCrop;
|
inputPhotoCropAuto#ade6b004 = InputPhotoCrop;
|
||||||
inputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop;
|
inputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop;
|
||||||
|
@ -189,6 +202,7 @@ fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileL
|
||||||
fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation;
|
fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation;
|
||||||
|
|
||||||
userEmpty#200250ba id:int = User;
|
userEmpty#200250ba id:int = User;
|
||||||
|
user#22e49072 flags:# id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User;
|
||||||
|
|
||||||
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
|
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
|
||||||
userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto;
|
userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto;
|
||||||
|
@ -196,6 +210,9 @@ userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileL
|
||||||
userStatusEmpty#9d05049 = UserStatus;
|
userStatusEmpty#9d05049 = UserStatus;
|
||||||
userStatusOnline#edb93949 expires:int = UserStatus;
|
userStatusOnline#edb93949 expires:int = UserStatus;
|
||||||
userStatusOffline#8c703f was_online:int = UserStatus;
|
userStatusOffline#8c703f was_online:int = UserStatus;
|
||||||
|
userStatusRecently#e26f42f1 = UserStatus;
|
||||||
|
userStatusLastWeek#7bf09fc = UserStatus;
|
||||||
|
userStatusLastMonth#77ebc742 = UserStatus;
|
||||||
|
|
||||||
chatEmpty#9ba2d800 id:int = Chat;
|
chatEmpty#9ba2d800 id:int = Chat;
|
||||||
chat#6e9c9bc7 id:int title:string photo:ChatPhoto participants_count:int date:int left:Bool version:int = Chat;
|
chat#6e9c9bc7 id:int title:string photo:ChatPhoto participants_count:int date:int left:Bool version:int = Chat;
|
||||||
|
@ -205,7 +222,7 @@ chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_s
|
||||||
|
|
||||||
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;
|
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;
|
||||||
|
|
||||||
chatParticipantsForbidden#fd2bb8a chat_id:int = ChatParticipants;
|
chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants;
|
||||||
chatParticipants#7841b415 chat_id:int admin_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants;
|
chatParticipants#7841b415 chat_id:int admin_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants;
|
||||||
|
|
||||||
chatPhotoEmpty#37c1011c = ChatPhoto;
|
chatPhotoEmpty#37c1011c = ChatPhoto;
|
||||||
|
@ -221,6 +238,10 @@ messageMediaVideo#5bcf1675 video:Video caption:string = MessageMedia;
|
||||||
messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
|
messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
|
||||||
messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia;
|
messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia;
|
||||||
messageMediaUnsupported#9f84f49e = MessageMedia;
|
messageMediaUnsupported#9f84f49e = MessageMedia;
|
||||||
|
messageMediaDocument#2fda2204 document:Document = MessageMedia;
|
||||||
|
messageMediaAudio#c6b68300 audio:Audio = MessageMedia;
|
||||||
|
messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;
|
||||||
|
messageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia;
|
||||||
|
|
||||||
messageActionEmpty#b6aef7b0 = MessageAction;
|
messageActionEmpty#b6aef7b0 = MessageAction;
|
||||||
messageActionChatCreate#a6638b9a title:string users:Vector<int> = MessageAction;
|
messageActionChatCreate#a6638b9a title:string users:Vector<int> = MessageAction;
|
||||||
|
@ -229,6 +250,7 @@ messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction;
|
||||||
messageActionChatDeletePhoto#95e3fbef = MessageAction;
|
messageActionChatDeletePhoto#95e3fbef = MessageAction;
|
||||||
messageActionChatAddUser#5e3cfc4b user_id:int = MessageAction;
|
messageActionChatAddUser#5e3cfc4b user_id:int = MessageAction;
|
||||||
messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction;
|
messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction;
|
||||||
|
messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction;
|
||||||
|
|
||||||
dialog#c1dd804a peer:Peer top_message:int read_inbox_max_id:int unread_count:int notify_settings:PeerNotifySettings = Dialog;
|
dialog#c1dd804a peer:Peer top_message:int read_inbox_max_id:int unread_count:int notify_settings:PeerNotifySettings = Dialog;
|
||||||
|
|
||||||
|
@ -248,6 +270,7 @@ geoPoint#2049d70c long:double lat:double = GeoPoint;
|
||||||
auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;
|
auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;
|
||||||
|
|
||||||
auth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
|
auth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
|
||||||
|
auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
|
||||||
|
|
||||||
auth.authorization#ff036af1 user:User = auth.Authorization;
|
auth.authorization#ff036af1 user:User = auth.Authorization;
|
||||||
|
|
||||||
|
@ -270,6 +293,7 @@ peerNotifySettingsEmpty#70a68512 = PeerNotifySettings;
|
||||||
peerNotifySettings#8d5e11ee mute_until:int sound:string show_previews:Bool events_mask:int = PeerNotifySettings;
|
peerNotifySettings#8d5e11ee mute_until:int sound:string show_previews:Bool events_mask:int = PeerNotifySettings;
|
||||||
|
|
||||||
wallPaper#ccb03657 id:int title:string sizes:Vector<PhotoSize> color:int = WallPaper;
|
wallPaper#ccb03657 id:int title:string sizes:Vector<PhotoSize> color:int = WallPaper;
|
||||||
|
wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper;
|
||||||
|
|
||||||
userFull#5a89ac5b user:User link:contacts.Link profile_photo:Photo notify_settings:PeerNotifySettings blocked:Bool bot_info:BotInfo = UserFull;
|
userFull#5a89ac5b user:User link:contacts.Link profile_photo:Photo notify_settings:PeerNotifySettings blocked:Bool bot_info:BotInfo = UserFull;
|
||||||
|
|
||||||
|
@ -329,6 +353,22 @@ updateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bo
|
||||||
updateContactRegistered#2575bbb9 user_id:int date:int = Update;
|
updateContactRegistered#2575bbb9 user_id:int date:int = Update;
|
||||||
updateContactLink#9d2e67c5 user_id:int my_link:ContactLink foreign_link:ContactLink = Update;
|
updateContactLink#9d2e67c5 user_id:int my_link:ContactLink foreign_link:ContactLink = Update;
|
||||||
updateNewAuthorization#8f06529a auth_key_id:long date:int device:string location:string = Update;
|
updateNewAuthorization#8f06529a auth_key_id:long date:int device:string location:string = Update;
|
||||||
|
updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update;
|
||||||
|
updateEncryptedChatTyping#1710f156 chat_id:int = Update;
|
||||||
|
updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update;
|
||||||
|
updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;
|
||||||
|
updateChatParticipantAdd#ea4b0e5c chat_id:int user_id:int inviter_id:int date:int version:int = Update;
|
||||||
|
updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update;
|
||||||
|
updateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update;
|
||||||
|
updateUserBlocked#80ece81a user_id:int blocked:Bool = Update;
|
||||||
|
updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update;
|
||||||
|
updateServiceNotification#382dd3e4 type:string message:string media:MessageMedia popup:Bool = Update;
|
||||||
|
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
|
||||||
|
updateUserPhone#12b9417b user_id:int phone:string = Update;
|
||||||
|
updateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update;
|
||||||
|
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
|
||||||
|
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;
|
||||||
|
updateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update;
|
||||||
|
|
||||||
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
|
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
|
||||||
|
|
||||||
|
@ -342,6 +382,7 @@ updateShortChatMessage#f9409b3d flags:# id:int from_id:int chat_id:int message:s
|
||||||
updateShort#78d4dec1 update:Update date:int = Updates;
|
updateShort#78d4dec1 update:Update date:int = Updates;
|
||||||
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
|
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
|
||||||
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
|
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
|
||||||
|
updateShortSentMessage#11f1331c flags:# id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;
|
||||||
|
|
||||||
photos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos;
|
photos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos;
|
||||||
photos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos;
|
photos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos;
|
||||||
|
@ -361,13 +402,6 @@ help.noAppUpdate#c45a6536 = help.AppUpdate;
|
||||||
|
|
||||||
help.inviteText#18cb9f78 message:string = help.InviteText;
|
help.inviteText#18cb9f78 message:string = help.InviteText;
|
||||||
|
|
||||||
wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper;
|
|
||||||
|
|
||||||
updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update;
|
|
||||||
updateEncryptedChatTyping#1710f156 chat_id:int = Update;
|
|
||||||
updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update;
|
|
||||||
updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;
|
|
||||||
|
|
||||||
encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;
|
encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;
|
||||||
encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;
|
encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;
|
||||||
encryptedChatRequested#c878527e id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat;
|
encryptedChatRequested#c878527e id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat;
|
||||||
|
@ -382,8 +416,7 @@ encryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerpri
|
||||||
inputEncryptedFileEmpty#1837c364 = InputEncryptedFile;
|
inputEncryptedFileEmpty#1837c364 = InputEncryptedFile;
|
||||||
inputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile;
|
inputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile;
|
||||||
inputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile;
|
inputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile;
|
||||||
|
inputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile;
|
||||||
inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;
|
|
||||||
|
|
||||||
encryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage;
|
encryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage;
|
||||||
encryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage;
|
encryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage;
|
||||||
|
@ -394,32 +427,12 @@ messages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhC
|
||||||
messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage;
|
messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage;
|
||||||
messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage;
|
messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage;
|
||||||
|
|
||||||
inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile;
|
|
||||||
|
|
||||||
inputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile;
|
|
||||||
|
|
||||||
updateChatParticipantAdd#3a0eeb22 chat_id:int user_id:int inviter_id:int version:int = Update;
|
|
||||||
updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update;
|
|
||||||
updateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update;
|
|
||||||
|
|
||||||
inputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia;
|
|
||||||
inputMediaAudio#89938781 id:InputAudio = InputMedia;
|
|
||||||
inputMediaUploadedDocument#ffe76b78 file:InputFile mime_type:string attributes:Vector<DocumentAttribute> = InputMedia;
|
|
||||||
inputMediaUploadedThumbDocument#41481486 file:InputFile thumb:InputFile mime_type:string attributes:Vector<DocumentAttribute> = InputMedia;
|
|
||||||
inputMediaDocument#d184e841 id:InputDocument = InputMedia;
|
|
||||||
|
|
||||||
messageMediaDocument#2fda2204 document:Document = MessageMedia;
|
|
||||||
messageMediaAudio#c6b68300 audio:Audio = MessageMedia;
|
|
||||||
|
|
||||||
inputAudioEmpty#d95adc84 = InputAudio;
|
inputAudioEmpty#d95adc84 = InputAudio;
|
||||||
inputAudio#77d440ff id:long access_hash:long = InputAudio;
|
inputAudio#77d440ff id:long access_hash:long = InputAudio;
|
||||||
|
|
||||||
inputDocumentEmpty#72f0eaae = InputDocument;
|
inputDocumentEmpty#72f0eaae = InputDocument;
|
||||||
inputDocument#18798952 id:long access_hash:long = InputDocument;
|
inputDocument#18798952 id:long access_hash:long = InputDocument;
|
||||||
|
|
||||||
inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation;
|
|
||||||
inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation;
|
|
||||||
|
|
||||||
audioEmpty#586988d8 id:long = Audio;
|
audioEmpty#586988d8 id:long = Audio;
|
||||||
audio#f9e35055 id:long access_hash:long date:int duration:int mime_type:string size:int dc_id:int = Audio;
|
audio#f9e35055 id:long access_hash:long date:int duration:int mime_type:string size:int dc_id:int = Audio;
|
||||||
|
|
||||||
|
@ -433,11 +446,6 @@ notifyUsers#b4c83b4c = NotifyPeer;
|
||||||
notifyChats#c007cec3 = NotifyPeer;
|
notifyChats#c007cec3 = NotifyPeer;
|
||||||
notifyAll#74d07c60 = NotifyPeer;
|
notifyAll#74d07c60 = NotifyPeer;
|
||||||
|
|
||||||
updateUserBlocked#80ece81a user_id:int blocked:Bool = Update;
|
|
||||||
updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update;
|
|
||||||
|
|
||||||
auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
|
|
||||||
|
|
||||||
sendMessageTypingAction#16bf744e = SendMessageAction;
|
sendMessageTypingAction#16bf744e = SendMessageAction;
|
||||||
sendMessageCancelAction#fd5ec8f5 = SendMessageAction;
|
sendMessageCancelAction#fd5ec8f5 = SendMessageAction;
|
||||||
sendMessageRecordVideoAction#a187d66f = SendMessageAction;
|
sendMessageRecordVideoAction#a187d66f = SendMessageAction;
|
||||||
|
@ -453,14 +461,6 @@ contactFound#ea879f95 user_id:int = ContactFound;
|
||||||
|
|
||||||
contacts.found#566000e results:Vector<ContactFound> users:Vector<User> = contacts.Found;
|
contacts.found#566000e results:Vector<ContactFound> users:Vector<User> = contacts.Found;
|
||||||
|
|
||||||
updateServiceNotification#382dd3e4 type:string message:string media:MessageMedia popup:Bool = Update;
|
|
||||||
|
|
||||||
userStatusRecently#e26f42f1 = UserStatus;
|
|
||||||
userStatusLastWeek#7bf09fc = UserStatus;
|
|
||||||
userStatusLastMonth#77ebc742 = UserStatus;
|
|
||||||
|
|
||||||
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
|
|
||||||
|
|
||||||
inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;
|
inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;
|
||||||
|
|
||||||
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
|
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
|
||||||
|
@ -485,8 +485,6 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
|
||||||
|
|
||||||
account.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode;
|
account.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode;
|
||||||
|
|
||||||
updateUserPhone#12b9417b user_id:int phone:string = Update;
|
|
||||||
|
|
||||||
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
|
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
|
||||||
documentAttributeAnimated#11b58939 = DocumentAttribute;
|
documentAttributeAnimated#11b58939 = DocumentAttribute;
|
||||||
documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute;
|
documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute;
|
||||||
|
@ -504,9 +502,6 @@ messages.allStickers#d51dafdb hash:string sets:Vector<StickerSet> = messages.All
|
||||||
|
|
||||||
disabledFeature#ae636f24 feature:string description:string = DisabledFeature;
|
disabledFeature#ae636f24 feature:string description:string = DisabledFeature;
|
||||||
|
|
||||||
updateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update;
|
|
||||||
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
|
|
||||||
|
|
||||||
messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages;
|
messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages;
|
||||||
|
|
||||||
contactLinkUnknown#5f4f9247 = ContactLink;
|
contactLinkUnknown#5f4f9247 = ContactLink;
|
||||||
|
@ -514,14 +509,10 @@ contactLinkNone#feedd3ad = ContactLink;
|
||||||
contactLinkHasPhone#268f3f59 = ContactLink;
|
contactLinkHasPhone#268f3f59 = ContactLink;
|
||||||
contactLinkContact#d502c2d0 = ContactLink;
|
contactLinkContact#d502c2d0 = ContactLink;
|
||||||
|
|
||||||
updateWebPage#2cc36971 webpage:WebPage = Update;
|
|
||||||
|
|
||||||
webPageEmpty#eb1477e8 id:long = WebPage;
|
webPageEmpty#eb1477e8 id:long = WebPage;
|
||||||
webPagePending#c586da1c id:long date:int = WebPage;
|
webPagePending#c586da1c id:long date:int = WebPage;
|
||||||
webPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage;
|
webPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage;
|
||||||
|
|
||||||
messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;
|
|
||||||
|
|
||||||
authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
|
authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
|
||||||
|
|
||||||
account.authorizations#1250abde authorizations:Vector<Authorization> = account.Authorizations;
|
account.authorizations#1250abde authorizations:Vector<Authorization> = account.Authorizations;
|
||||||
|
@ -535,10 +526,6 @@ account.passwordInputSettings#bcfc532c flags:# new_salt:flags.0?bytes new_passwo
|
||||||
|
|
||||||
auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery;
|
auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery;
|
||||||
|
|
||||||
inputMediaVenue#2827a81a geo_point:InputGeoPoint title:string address:string provider:string venue_id:string = InputMedia;
|
|
||||||
|
|
||||||
messageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia;
|
|
||||||
|
|
||||||
receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage;
|
receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage;
|
||||||
|
|
||||||
chatInviteEmpty#69df3769 = ExportedChatInvite;
|
chatInviteEmpty#69df3769 = ExportedChatInvite;
|
||||||
|
@ -547,10 +534,6 @@ chatInviteExported#fc2e05bc link:string = ExportedChatInvite;
|
||||||
chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
|
chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
|
||||||
chatInvite#ce917dcd title:string = ChatInvite;
|
chatInvite#ce917dcd title:string = ChatInvite;
|
||||||
|
|
||||||
messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction;
|
|
||||||
|
|
||||||
updateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update;
|
|
||||||
|
|
||||||
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
|
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
|
||||||
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
|
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
|
||||||
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
|
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
|
||||||
|
@ -559,8 +542,6 @@ stickerSet#cd303b41 flags:# id:long access_hash:long title:string short_name:str
|
||||||
|
|
||||||
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
|
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
|
||||||
|
|
||||||
user#22e49072 flags:# id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User;
|
|
||||||
|
|
||||||
botCommand#c27ac8c7 command:string description:string = BotCommand;
|
botCommand#c27ac8c7 command:string description:string = BotCommand;
|
||||||
|
|
||||||
botInfoEmpty#bb2e37ce = BotInfo;
|
botInfoEmpty#bb2e37ce = BotInfo;
|
||||||
|
@ -574,10 +555,6 @@ replyKeyboardHide#a03e5b85 flags:# = ReplyMarkup;
|
||||||
replyKeyboardForceReply#f4108aa0 flags:# = ReplyMarkup;
|
replyKeyboardForceReply#f4108aa0 flags:# = ReplyMarkup;
|
||||||
replyKeyboardMarkup#3502758c flags:# rows:Vector<KeyboardButtonRow> = ReplyMarkup;
|
replyKeyboardMarkup#3502758c flags:# rows:Vector<KeyboardButtonRow> = ReplyMarkup;
|
||||||
|
|
||||||
inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer;
|
|
||||||
|
|
||||||
inputUser#d8292816 user_id:int access_hash:long = InputUser;
|
|
||||||
|
|
||||||
help.appChangelogEmpty#af7e0394 = help.AppChangelog;
|
help.appChangelogEmpty#af7e0394 = help.AppChangelog;
|
||||||
help.appChangelog#4668e6bd text:string = help.AppChangelog;
|
help.appChangelog#4668e6bd text:string = help.AppChangelog;
|
||||||
|
|
||||||
|
@ -593,13 +570,13 @@ messageEntityCode#28a20571 offset:int length:int = MessageEntity;
|
||||||
messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity;
|
messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity;
|
||||||
messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity;
|
messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity;
|
||||||
|
|
||||||
updateShortSentMessage#11f1331c flags:# id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;
|
|
||||||
|
|
||||||
---functions---
|
---functions---
|
||||||
|
|
||||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||||
|
|
||||||
invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;
|
invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;
|
||||||
|
initConnection#69796de9 {X:Type} api_id:int device_model:string system_version:string app_version:string lang_code:string query:!X = X;
|
||||||
|
invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
|
||||||
|
invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;
|
||||||
|
|
||||||
auth.checkPhone#6fe51dfb phone_number:string = auth.CheckedPhone;
|
auth.checkPhone#6fe51dfb phone_number:string = auth.CheckedPhone;
|
||||||
auth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode;
|
auth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode;
|
||||||
|
@ -612,6 +589,11 @@ auth.sendInvites#771c1d97 phone_numbers:Vector<string> message:string = Bool;
|
||||||
auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;
|
auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;
|
||||||
auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization;
|
auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization;
|
||||||
auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;
|
auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;
|
||||||
|
auth.sendSms#da9f3e8 phone_number:string phone_code_hash:string = Bool;
|
||||||
|
auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;
|
||||||
|
auth.checkPassword#a63011e password_hash:bytes = auth.Authorization;
|
||||||
|
auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery;
|
||||||
|
auth.recoverPassword#4ea56e92 code:string = auth.Authorization;
|
||||||
|
|
||||||
account.registerDevice#446c712c token_type:int token:string device_model:string system_version:string app_version:string app_sandbox:Bool lang_code:string = Bool;
|
account.registerDevice#446c712c token_type:int token:string device_model:string system_version:string app_version:string app_sandbox:Bool lang_code:string = Bool;
|
||||||
account.unregisterDevice#65c55b40 token_type:int token:string = Bool;
|
account.unregisterDevice#65c55b40 token_type:int token:string = Bool;
|
||||||
|
@ -621,6 +603,21 @@ account.resetNotifySettings#db7e1747 = Bool;
|
||||||
account.updateProfile#f0888d68 first_name:string last_name:string = User;
|
account.updateProfile#f0888d68 first_name:string last_name:string = User;
|
||||||
account.updateStatus#6628562c offline:Bool = Bool;
|
account.updateStatus#6628562c offline:Bool = Bool;
|
||||||
account.getWallPapers#c04cfac2 = Vector<WallPaper>;
|
account.getWallPapers#c04cfac2 = Vector<WallPaper>;
|
||||||
|
account.checkUsername#2714d86c username:string = Bool;
|
||||||
|
account.updateUsername#3e0bdd7c username:string = User;
|
||||||
|
account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
|
||||||
|
account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;
|
||||||
|
account.deleteAccount#418d4e0b reason:string = Bool;
|
||||||
|
account.getAccountTTL#8fc711d = AccountDaysTTL;
|
||||||
|
account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool;
|
||||||
|
account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode;
|
||||||
|
account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;
|
||||||
|
account.updateDeviceLocked#38df3532 period:int = Bool;
|
||||||
|
account.getAuthorizations#e320c158 = account.Authorizations;
|
||||||
|
account.resetAuthorization#df77f3bc hash:long = Bool;
|
||||||
|
account.getPassword#548a30f5 = account.Password;
|
||||||
|
account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings;
|
||||||
|
account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool;
|
||||||
|
|
||||||
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
|
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
|
||||||
users.getFullUser#ca30a5b1 id:InputUser = UserFull;
|
users.getFullUser#ca30a5b1 id:InputUser = UserFull;
|
||||||
|
@ -636,6 +633,8 @@ contacts.unblock#e54100bd id:InputUser = Bool;
|
||||||
contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;
|
contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;
|
||||||
contacts.exportCard#84e53737 = Vector<int>;
|
contacts.exportCard#84e53737 = Vector<int>;
|
||||||
contacts.importCard#4fe196fe export_card:Vector<int> = User;
|
contacts.importCard#4fe196fe export_card:Vector<int> = User;
|
||||||
|
contacts.search#11f812d8 q:string limit:int = contacts.Found;
|
||||||
|
contacts.resolveUsername#bf0131c username:string = User;
|
||||||
|
|
||||||
messages.getMessages#4222fa74 id:Vector<int> = messages.Messages;
|
messages.getMessages#4222fa74 id:Vector<int> = messages.Messages;
|
||||||
messages.getDialogs#eccf1df6 offset:int max_id:int limit:int = messages.Dialogs;
|
messages.getDialogs#eccf1df6 offset:int max_id:int limit:int = messages.Dialogs;
|
||||||
|
@ -649,6 +648,7 @@ messages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool;
|
||||||
messages.sendMessage#fa88427a flags:# peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Updates;
|
messages.sendMessage#fa88427a flags:# peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Updates;
|
||||||
messages.sendMedia#c8f16791 flags:# peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates;
|
messages.sendMedia#c8f16791 flags:# peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates;
|
||||||
messages.forwardMessages#55e1728d peer:InputPeer id:Vector<int> random_id:Vector<long> = Updates;
|
messages.forwardMessages#55e1728d peer:InputPeer id:Vector<int> random_id:Vector<long> = Updates;
|
||||||
|
messages.reportSpam#cf1592db peer:InputPeer = Bool;
|
||||||
messages.getChats#3c6aa187 id:Vector<int> = messages.Chats;
|
messages.getChats#3c6aa187 id:Vector<int> = messages.Chats;
|
||||||
messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull;
|
messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull;
|
||||||
messages.editChatTitle#dc452855 chat_id:int title:string = Updates;
|
messages.editChatTitle#dc452855 chat_id:int title:string = Updates;
|
||||||
|
@ -656,25 +656,6 @@ messages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates;
|
||||||
messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates;
|
messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates;
|
||||||
messages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates;
|
messages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates;
|
||||||
messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;
|
messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;
|
||||||
|
|
||||||
updates.getState#edd4882a = updates.State;
|
|
||||||
updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference;
|
|
||||||
|
|
||||||
photos.updateProfilePhoto#eef579a0 id:InputPhoto crop:InputPhotoCrop = UserProfilePhoto;
|
|
||||||
photos.uploadProfilePhoto#d50f9c88 file:InputFile caption:string geo_point:InputGeoPoint crop:InputPhotoCrop = photos.Photo;
|
|
||||||
photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
|
|
||||||
|
|
||||||
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
|
|
||||||
upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File;
|
|
||||||
|
|
||||||
help.getConfig#c4f9186b = Config;
|
|
||||||
help.getNearestDc#1fb33026 = NearestDc;
|
|
||||||
help.getAppUpdate#c812ac7e device_model:string system_version:string app_version:string lang_code:string = help.AppUpdate;
|
|
||||||
help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool;
|
|
||||||
help.getInviteText#a4a95186 lang_code:string = help.InviteText;
|
|
||||||
|
|
||||||
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
|
|
||||||
|
|
||||||
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
|
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
|
||||||
messages.sendBroadcast#bf73f4da contacts:Vector<InputUser> random_id:Vector<long> message:string media:InputMedia = Updates;
|
messages.sendBroadcast#bf73f4da contacts:Vector<InputUser> random_id:Vector<long> message:string media:InputMedia = Updates;
|
||||||
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
|
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
|
||||||
|
@ -687,56 +668,10 @@ messages.sendEncrypted#a9776773 peer:InputEncryptedChat random_id:long data:byte
|
||||||
messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage;
|
messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage;
|
||||||
messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;
|
messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;
|
||||||
messages.receivedQueue#55a5bb66 max_qts:int = Vector<long>;
|
messages.receivedQueue#55a5bb66 max_qts:int = Vector<long>;
|
||||||
|
|
||||||
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
|
|
||||||
|
|
||||||
initConnection#69796de9 {X:Type} api_id:int device_model:string system_version:string app_version:string lang_code:string query:!X = X;
|
|
||||||
|
|
||||||
help.getSupport#9cdf08cd = help.Support;
|
|
||||||
|
|
||||||
auth.sendSms#da9f3e8 phone_number:string phone_code_hash:string = Bool;
|
|
||||||
|
|
||||||
messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages;
|
messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages;
|
||||||
|
|
||||||
account.checkUsername#2714d86c username:string = Bool;
|
|
||||||
account.updateUsername#3e0bdd7c username:string = User;
|
|
||||||
|
|
||||||
contacts.search#11f812d8 q:string limit:int = contacts.Found;
|
|
||||||
|
|
||||||
account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
|
|
||||||
account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;
|
|
||||||
account.deleteAccount#418d4e0b reason:string = Bool;
|
|
||||||
account.getAccountTTL#8fc711d = AccountDaysTTL;
|
|
||||||
account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool;
|
|
||||||
|
|
||||||
invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
|
|
||||||
|
|
||||||
contacts.resolveUsername#bf0131c username:string = User;
|
|
||||||
|
|
||||||
account.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode;
|
|
||||||
account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;
|
|
||||||
|
|
||||||
messages.getStickers#ae22e045 emoticon:string hash:string = messages.Stickers;
|
messages.getStickers#ae22e045 emoticon:string hash:string = messages.Stickers;
|
||||||
messages.getAllStickers#aa3bc868 hash:string = messages.AllStickers;
|
messages.getAllStickers#aa3bc868 hash:string = messages.AllStickers;
|
||||||
|
|
||||||
account.updateDeviceLocked#38df3532 period:int = Bool;
|
|
||||||
|
|
||||||
auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;
|
|
||||||
|
|
||||||
messages.getWebPagePreview#25223e24 message:string = MessageMedia;
|
messages.getWebPagePreview#25223e24 message:string = MessageMedia;
|
||||||
|
|
||||||
account.getAuthorizations#e320c158 = account.Authorizations;
|
|
||||||
account.resetAuthorization#df77f3bc hash:long = Bool;
|
|
||||||
account.getPassword#548a30f5 = account.Password;
|
|
||||||
account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings;
|
|
||||||
account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool;
|
|
||||||
|
|
||||||
auth.checkPassword#a63011e password_hash:bytes = auth.Authorization;
|
|
||||||
auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery;
|
|
||||||
auth.recoverPassword#4ea56e92 code:string = auth.Authorization;
|
|
||||||
|
|
||||||
invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;
|
|
||||||
|
|
||||||
messages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite;
|
messages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite;
|
||||||
messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
|
messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
|
||||||
messages.importChatInvite#6c50051c hash:string = Updates;
|
messages.importChatInvite#6c50051c hash:string = Updates;
|
||||||
|
@ -745,4 +680,22 @@ messages.installStickerSet#7b30c3a6 stickerset:InputStickerSet disabled:Bool = B
|
||||||
messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;
|
messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;
|
||||||
messages.startBot#1b3e0ffc bot:InputUser chat_id:int random_id:long start_param:string = Updates;
|
messages.startBot#1b3e0ffc bot:InputUser chat_id:int random_id:long start_param:string = Updates;
|
||||||
|
|
||||||
|
updates.getState#edd4882a = updates.State;
|
||||||
|
updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference;
|
||||||
|
|
||||||
|
photos.updateProfilePhoto#eef579a0 id:InputPhoto crop:InputPhotoCrop = UserProfilePhoto;
|
||||||
|
photos.uploadProfilePhoto#d50f9c88 file:InputFile caption:string geo_point:InputGeoPoint crop:InputPhotoCrop = photos.Photo;
|
||||||
|
photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;
|
||||||
|
photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;
|
||||||
|
|
||||||
|
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;
|
||||||
|
upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File;
|
||||||
|
upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;
|
||||||
|
|
||||||
|
help.getConfig#c4f9186b = Config;
|
||||||
|
help.getNearestDc#1fb33026 = NearestDc;
|
||||||
|
help.getAppUpdate#c812ac7e device_model:string system_version:string app_version:string lang_code:string = help.AppUpdate;
|
||||||
|
help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool;
|
||||||
|
help.getInviteText#a4a95186 lang_code:string = help.InviteText;
|
||||||
|
help.getSupport#9cdf08cd = help.Support;
|
||||||
help.getAppChangelog#5bab7fb2 device_model:string system_version:string app_version:string lang_code:string = help.AppChangelog;
|
help.getAppChangelog#5bab7fb2 device_model:string system_version:string app_version:string lang_code:string = help.AppChangelog;
|
||||||
|
|
|
@ -299,7 +299,8 @@ void ProfileInner::blockDone(bool blocked, const MTPBool &result) {
|
||||||
|
|
||||||
bool ProfileInner::blockFail(const RPCError &error) {
|
bool ProfileInner::blockFail(const RPCError &error) {
|
||||||
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
||||||
//_blockRequest = 0;
|
|
||||||
|
_blockRequest = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,8 @@ float64 gSongVolume = 0.9;
|
||||||
SavedPeers gSavedPeers;
|
SavedPeers gSavedPeers;
|
||||||
SavedPeersByTime gSavedPeersByTime;
|
SavedPeersByTime gSavedPeersByTime;
|
||||||
|
|
||||||
|
ReportSpamStatuses gReportSpamStatuses;
|
||||||
|
|
||||||
void settingsParseArgs(int argc, char *argv[]) {
|
void settingsParseArgs(int argc, char *argv[]) {
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
if (QSysInfo::macVersion() < QSysInfo::MV_10_8) {
|
if (QSysInfo::macVersion() < QSysInfo::MV_10_8) {
|
||||||
|
|
|
@ -317,4 +317,7 @@ typedef QMultiMap<QDateTime, PeerData*> SavedPeersByTime;
|
||||||
DeclareRefSetting(SavedPeers, SavedPeers);
|
DeclareRefSetting(SavedPeers, SavedPeers);
|
||||||
DeclareRefSetting(SavedPeersByTime, SavedPeersByTime);
|
DeclareRefSetting(SavedPeersByTime, SavedPeersByTime);
|
||||||
|
|
||||||
|
typedef QMap<uint64, DBIPeerReportSpamStatus> ReportSpamStatuses;
|
||||||
|
DeclareRefSetting(ReportSpamStatuses, ReportSpamStatuses);
|
||||||
|
|
||||||
void settingsParseArgs(int argc, char *argv[]);
|
void settingsParseArgs(int argc, char *argv[]);
|
||||||
|
|
|
@ -208,13 +208,14 @@ struct UserData : public PeerData {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ChatData : public PeerData {
|
struct ChatData : public PeerData {
|
||||||
ChatData(const PeerId &id) : PeerData(id), count(0), date(0), version(0), left(false), forbidden(true), botStatus(0) {
|
ChatData(const PeerId &id) : PeerData(id), count(0), date(0), version(0), inviterForSpamReport(0), left(false), forbidden(true), botStatus(0) {
|
||||||
}
|
}
|
||||||
void setPhoto(const MTPChatPhoto &photo, const PhotoId &phId = UnknownPeerPhotoId);
|
void setPhoto(const MTPChatPhoto &photo, const PhotoId &phId = UnknownPeerPhotoId);
|
||||||
int32 count;
|
int32 count;
|
||||||
int32 date;
|
int32 date;
|
||||||
int32 version;
|
int32 version;
|
||||||
int32 admin;
|
int32 admin;
|
||||||
|
int32 inviterForSpamReport; // > 0 - user who invited me to chat in unread service msg, < 0 - have outgoing message
|
||||||
bool left;
|
bool left;
|
||||||
bool forbidden;
|
bool forbidden;
|
||||||
typedef QMap<UserData*, int32> Participants;
|
typedef QMap<UserData*, int32> Participants;
|
||||||
|
|
|
@ -357,6 +357,13 @@ enum DBIPlatform {
|
||||||
dbipLinux32 = 3,
|
dbipLinux32 = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum DBIPeerReportSpamStatus {
|
||||||
|
dbiprsNoButton,
|
||||||
|
dbiprsUnknown,
|
||||||
|
dbiprsShowButton,
|
||||||
|
dbiprsReportSent,
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HitTestNone = 0,
|
HitTestNone = 0,
|
||||||
HitTestClient,
|
HitTestClient,
|
||||||
|
|
|
@ -1418,7 +1418,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
||||||
HistoryItem *notifyItem = 0;
|
HistoryItem *notifyItem = 0;
|
||||||
History *notifyHistory = 0;
|
History *notifyHistory = 0;
|
||||||
NotifyWaiters::iterator notifyWaiter = notifyWaiters.end();
|
NotifyWaiters::iterator notifyWaiter = notifyWaiters.end();
|
||||||
for (NotifyWaiters::iterator i = notifyWaiters.begin(); i != notifyWaiters.end(); ++i) {
|
for (NotifyWaiters::iterator i = notifyWaiters.begin(); i != notifyWaiters.end();) {
|
||||||
History *history = i.key();
|
History *history = i.key();
|
||||||
if (history->currentNotification() && history->currentNotification()->id != i.value().msg) {
|
if (history->currentNotification() && history->currentNotification()->id != i.value().msg) {
|
||||||
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
||||||
|
@ -1451,6 +1451,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
||||||
notifyHistory = history;
|
notifyHistory = history;
|
||||||
notifyWaiter = i;
|
notifyWaiter = i;
|
||||||
}
|
}
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
if (notifyItem) {
|
if (notifyItem) {
|
||||||
if (next > ms) {
|
if (next > ms) {
|
||||||
|
@ -1467,8 +1468,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
||||||
uint64 ms = getms(true);
|
uint64 ms = getms(true);
|
||||||
History *history = notifyItem->history();
|
History *history = notifyItem->history();
|
||||||
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
||||||
bool notifyWhenFound = (j != notifyWhenMaps.cend());
|
if (j == notifyWhenMaps.cend()) {
|
||||||
if (!notifyWhenFound) {
|
|
||||||
history->clearNotifications();
|
history->clearNotifications();
|
||||||
} else {
|
} else {
|
||||||
HistoryItem *nextNotify = 0;
|
HistoryItem *nextNotify = 0;
|
||||||
|
@ -1516,7 +1516,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
||||||
|
|
||||||
if (!history->hasNotification()) {
|
if (!history->hasNotification()) {
|
||||||
if (notifyWaiter != notifyWaiters.cend()) notifyWaiters.erase(notifyWaiter);
|
if (notifyWaiter != notifyWaiters.cend()) notifyWaiters.erase(notifyWaiter);
|
||||||
if (notifyWhenFound) notifyWhenMaps.erase(j);
|
notifyWhenMaps.remove(history);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ index cfd12d8..8a6f9fb 100644
|
||||||
return ALC_FALSE;
|
return ALC_FALSE;
|
||||||
}
|
}
|
||||||
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
|
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
|
||||||
index 03805ab..77212c2 100644
|
index 03805ab..5035a36 100644
|
||||||
--- a/Alc/backends/winmm.c
|
--- a/Alc/backends/winmm.c
|
||||||
+++ b/Alc/backends/winmm.c
|
+++ b/Alc/backends/winmm.c
|
||||||
@@ -220,7 +220,7 @@ FORCE_ALIGN static int ALCwinmmPlayback_mixerProc(void *arg)
|
@@ -220,7 +220,7 @@ FORCE_ALIGN static int ALCwinmmPlayback_mixerProc(void *arg)
|
||||||
|
@ -20,7 +20,7 @@ index 03805ab..77212c2 100644
|
||||||
althrd_setname(althrd_current(), MIXER_THREAD_NAME);
|
althrd_setname(althrd_current(), MIXER_THREAD_NAME);
|
||||||
|
|
||||||
- while(GetMessage(&msg, NULL, 0, 0))
|
- while(GetMessage(&msg, NULL, 0, 0))
|
||||||
+ if (!self->killNow) while (GetMessage(&msg, NULL, 0, 0))
|
+ if (!self->killNow) while(GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if(msg.message != WOM_DONE)
|
if(msg.message != WOM_DONE)
|
||||||
continue;
|
continue;
|
||||||
|
@ -29,7 +29,7 @@ index 03805ab..77212c2 100644
|
||||||
althrd_setname(althrd_current(), RECORD_THREAD_NAME);
|
althrd_setname(althrd_current(), RECORD_THREAD_NAME);
|
||||||
|
|
||||||
- while(GetMessage(&msg, NULL, 0, 0))
|
- while(GetMessage(&msg, NULL, 0, 0))
|
||||||
+ if (!self->killNow) while(GetMessage(&msg, NULL, 0, 0))
|
+ if (!self->killNow) while (GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if(msg.message != WIM_DATA)
|
if(msg.message != WIM_DATA)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue