mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
By voicechat link open the channel as well.
This commit is contained in:
parent
2b3469ef22
commit
4d24f28fd0
1 changed files with 12 additions and 6 deletions
|
@ -178,7 +178,19 @@ void SessionNavigation::resolveChannelById(
|
|||
void SessionNavigation::showPeerByLinkResolved(
|
||||
not_null<PeerData*> peer,
|
||||
const PeerByLinkInfo &info) {
|
||||
auto params = SectionShow{
|
||||
SectionShow::Way::Forward
|
||||
};
|
||||
params.origin = SectionShow::OriginMessage{
|
||||
info.clickFromMessageId
|
||||
};
|
||||
if (info.voicechatHash && peer->isChannel()) {
|
||||
// First show the channel itself.
|
||||
crl::on_main(this, [=] {
|
||||
showPeerHistory(peer->id, params, ShowAtUnreadMsgId);
|
||||
});
|
||||
|
||||
// Then try to join the voice chat.
|
||||
const auto bad = [=] {
|
||||
Ui::ShowMultilineToast({
|
||||
.text = { tr::lng_group_invite_bad_link(tr::now) }
|
||||
|
@ -224,12 +236,6 @@ void SessionNavigation::showPeerByLinkResolved(
|
|||
}).send();
|
||||
return;
|
||||
}
|
||||
auto params = SectionShow{
|
||||
SectionShow::Way::Forward
|
||||
};
|
||||
params.origin = SectionShow::OriginMessage{
|
||||
info.clickFromMessageId
|
||||
};
|
||||
const auto &replies = info.repliesInfo;
|
||||
if (const auto threadId = std::get_if<ThreadId>(&replies)) {
|
||||
showRepliesForMessage(
|
||||
|
|
Loading…
Add table
Reference in a new issue