mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Support t.me/username?text=.. links.
This commit is contained in:
parent
170ebb57c6
commit
a506b8b25c
3 changed files with 6 additions and 0 deletions
|
@ -563,6 +563,7 @@ bool ResolveUsernameOrPhone(
|
|||
.phone = phone,
|
||||
.messageId = post,
|
||||
.storyId = storyId,
|
||||
.text = params.value(u"text"_q),
|
||||
.repliesInfo = commentId
|
||||
? Window::RepliesByLinkInfo{
|
||||
Window::CommentId{ commentId }
|
||||
|
|
|
@ -702,7 +702,11 @@ void SessionNavigation::showPeerByLinkResolved(
|
|||
contextUser->owner().history(contextUser))
|
||||
: std::optional<Api::SendAction>()));
|
||||
} else {
|
||||
const auto draft = info.text;
|
||||
crl::on_main(this, [=] {
|
||||
if (peer->isUser() && !draft.isEmpty()) {
|
||||
Data::SetChatLinkDraft(peer, { draft });
|
||||
}
|
||||
showPeerHistory(peer, params, msgId);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ struct PeerByLinkInfo {
|
|||
QString chatLinkSlug;
|
||||
MsgId messageId = ShowAtUnreadMsgId;
|
||||
StoryId storyId = 0;
|
||||
QString text;
|
||||
RepliesByLinkInfo repliesInfo;
|
||||
ResolveType resolveType = ResolveType::Default;
|
||||
QString startToken;
|
||||
|
|
Loading…
Add table
Reference in a new issue