2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Support t.me/+phonenumber links.

This commit is contained in:
John Preston
2022-03-01 14:44:29 +03:00
parent f7957a8903
commit bea2cfd363
6 changed files with 81 additions and 21 deletions

View File

@@ -173,6 +173,7 @@ public:
using RepliesByLinkInfo = std::variant<v::null_t, CommentId, ThreadId>;
struct PeerByLinkInfo {
std::variant<QString, ChannelId> usernameOrId;
QString phone;
MsgId messageId = ShowAtUnreadMsgId;
RepliesByLinkInfo repliesInfo;
QString startToken;
@@ -230,6 +231,9 @@ public:
private:
void resolvePhone(
const QString &phone,
Fn<void(not_null<PeerData*>)> done);
void resolveUsername(
const QString &username,
Fn<void(not_null<PeerData*>)> done);
@@ -237,6 +241,10 @@ private:
ChannelId channelId,
Fn<void(not_null<ChannelData*>)> done);
void resolveDone(
const MTPcontacts_ResolvedPeer &result,
Fn<void(not_null<PeerData*>)> done);
void showPeerByLinkResolved(
not_null<PeerData*> peer,
const PeerByLinkInfo &info);