mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Support t.me/username?profile links.
This commit is contained in:
parent
86cdda2277
commit
db0856f71c
3 changed files with 6 additions and 1 deletions
|
@ -503,7 +503,9 @@ bool ResolveUsernameOrPhone(
|
|||
return false;
|
||||
}
|
||||
using ResolveType = Window::ResolveType;
|
||||
auto resolveType = ResolveType::Default;
|
||||
auto resolveType = params.contains(u"profile"_q)
|
||||
? ResolveType::Profile
|
||||
: ResolveType::Default;
|
||||
auto startToken = params.value(u"start"_q);
|
||||
if (!startToken.isEmpty()) {
|
||||
resolveType = ResolveType::BotStart;
|
||||
|
|
|
@ -577,6 +577,8 @@ void SessionNavigation::showPeerByLinkResolved(
|
|||
info.messageId,
|
||||
commentId->id,
|
||||
params);
|
||||
} else if (resolveType == ResolveType::Profile) {
|
||||
showPeerInfo(peer, params);
|
||||
} else if (peer->isForum() && resolveType != ResolveType::Boost) {
|
||||
const auto itemId = info.messageId;
|
||||
if (!itemId) {
|
||||
|
|
|
@ -22,6 +22,7 @@ enum class ResolveType {
|
|||
ShareGame,
|
||||
Mention,
|
||||
Boost,
|
||||
Profile,
|
||||
};
|
||||
|
||||
struct CommentId {
|
||||
|
|
Loading…
Add table
Reference in a new issue