Version 5.16: Fix build with GCC.

This commit is contained in:
John Preston
2025-07-01 23:31:11 +04:00
parent 4584d912cc
commit 869854fbc2
3 changed files with 7 additions and 3 deletions
@@ -534,11 +534,16 @@ std::shared_ptr<ClickHandler> AcceptClickHandler(
std::shared_ptr<ClickHandler> DeclineClickHandler(
not_null<HistoryItem*> item) {
const auto session = &item->history()->session();
const auto id = item->fullId();
return std::make_shared<LambdaClickHandler>([=](ClickContext context) {
const auto my = context.other.value<ClickHandlerContext>();
const auto controller = my.sessionWindow.get();
if (!controller) {
if (!controller || &controller->session() != session) {
return;
}
const auto item = session->data().message(id);
if (!item) {
return;
}
RequestDeclineComment(controller->uiShow(), item);