Fixed switch inline query in channel direct messages.

This commit is contained in:
23rd
2026-07-26 08:52:56 +03:00
parent 0d7f6500b5
commit 9fa4807fdc

View File

@@ -2464,6 +2464,8 @@ bool SessionController::switchInlineQuery(
if (to.section == Section::Replies) {
const auto commentId = MsgId();
showRepliesForMessage(history, topicRootId, commentId, params);
} else if (const auto sublist = thread->asSublist()) {
showSublist(sublist, MsgId(), params);
} else {
showPeerHistory(history->peer, params);
}
@@ -2479,8 +2481,13 @@ bool SessionController::switchInlineQuery(
.key = thread,
.section = (thread->asTopic()
? Dialogs::EntryState::Section::Replies
: thread->asSublist()
? Dialogs::EntryState::Section::SavedSublist
: Dialogs::EntryState::Section::History),
.currentReplyTo = { .topicRootId = thread->topicRootId() },
.currentReplyTo = {
.topicRootId = thread->topicRootId(),
.monoforumPeerId = thread->monoforumPeerId(),
},
};
return switchInlineQuery(entryState, bot, query);
}