mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Support t.me/username?text=.. links.
This commit is contained in:
@@ -563,6 +563,7 @@ bool ResolveUsernameOrPhone(
|
|||||||
.phone = phone,
|
.phone = phone,
|
||||||
.messageId = post,
|
.messageId = post,
|
||||||
.storyId = storyId,
|
.storyId = storyId,
|
||||||
|
.text = params.value(u"text"_q),
|
||||||
.repliesInfo = commentId
|
.repliesInfo = commentId
|
||||||
? Window::RepliesByLinkInfo{
|
? Window::RepliesByLinkInfo{
|
||||||
Window::CommentId{ commentId }
|
Window::CommentId{ commentId }
|
||||||
|
@@ -702,7 +702,11 @@ void SessionNavigation::showPeerByLinkResolved(
|
|||||||
contextUser->owner().history(contextUser))
|
contextUser->owner().history(contextUser))
|
||||||
: std::optional<Api::SendAction>()));
|
: std::optional<Api::SendAction>()));
|
||||||
} else {
|
} else {
|
||||||
|
const auto draft = info.text;
|
||||||
crl::on_main(this, [=] {
|
crl::on_main(this, [=] {
|
||||||
|
if (peer->isUser() && !draft.isEmpty()) {
|
||||||
|
Data::SetChatLinkDraft(peer, { draft });
|
||||||
|
}
|
||||||
showPeerHistory(peer, params, msgId);
|
showPeerHistory(peer, params, msgId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,7 @@ struct PeerByLinkInfo {
|
|||||||
QString chatLinkSlug;
|
QString chatLinkSlug;
|
||||||
MsgId messageId = ShowAtUnreadMsgId;
|
MsgId messageId = ShowAtUnreadMsgId;
|
||||||
StoryId storyId = 0;
|
StoryId storyId = 0;
|
||||||
|
QString text;
|
||||||
RepliesByLinkInfo repliesInfo;
|
RepliesByLinkInfo repliesInfo;
|
||||||
ResolveType resolveType = ResolveType::Default;
|
ResolveType resolveType = ResolveType::Default;
|
||||||
QString startToken;
|
QString startToken;
|
||||||
|
Reference in New Issue
Block a user