2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Add support for requesting deep link info.

Also update API scheme.
Also remove auth.checkPhone requests.
This commit is contained in:
John Preston
2018-04-18 19:42:02 +04:00
parent 46af87a00a
commit 67e698a374
16 changed files with 153 additions and 4 deletions

View File

@@ -233,6 +233,22 @@ void ApiWrap::proxyPromotionDone(const MTPhelp_ProxyData &proxy) {
}
}
void ApiWrap::requestDeepLinkInfo(
const QString &path,
base::lambda<void(const MTPDhelp_deepLinkInfo &result)> callback) {
request(_deepLinkInfoRequestId).cancel();
_deepLinkInfoRequestId = request(MTPhelp_GetDeepLinkInfo(
MTP_string(path)
)).done([=](const MTPhelp_DeepLinkInfo &result) {
_deepLinkInfoRequestId = 0;
if (result.type() == mtpc_help_deepLinkInfo) {
callback(result.c_help_deepLinkInfo());
}
}).fail([=](const RPCError &error) {
_deepLinkInfoRequestId = 0;
}).send();
}
void ApiWrap::applyUpdates(
const MTPUpdates &updates,
uint64 sentMessageRandomId) {