diff --git a/Telegram/SourceFiles/data/components/ephemeral_messages.cpp b/Telegram/SourceFiles/data/components/ephemeral_messages.cpp index dd00701bf5..a827af9ca3 100644 --- a/Telegram/SourceFiles/data/components/ephemeral_messages.cpp +++ b/Telegram/SourceFiles/data/components/ephemeral_messages.cpp @@ -316,6 +316,9 @@ bool EphemeralMessages::trySend(const Api::MessageToSend &message) { const auto replyToId = message.action.replyTo.messageId; if (const auto replyTo = _session->data().message(replyToId)) { if (replyTo->isEphemeral()) { + if (replyTo->out()) { + return true; + } const auto entry = findByItem(replyTo); const auto bot = entry ? botForSending(*entry) : nullptr; if (bot) { diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 0bb8e500cd..7fbe7c0b49 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -3204,7 +3204,9 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { }; const auto addReplyAction = [&](HistoryItem *item) { - if (!item || (!item->isRegular() && !item->isEphemeral())) { + if (!item + || (!item->isRegular() + && (!item->isEphemeral() || item->out()))) { return; } const auto canSendReply = CanSendReply(item); @@ -6190,6 +6192,9 @@ auto HistoryInner::DelegateMixin() } bool CanSendReply(not_null item) { + if (item->isEphemeral() && item->out()) { + return false; + } const auto peer = item->history()->peer; if (const auto topic = item->topic()) { return Data::CanSendAnything(topic); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index bc24b84f59..a1503d1897 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -9889,7 +9889,8 @@ void HistoryWidget::processReply() { return processCancel(); #endif } else if (!_processingReplyItem->isRegular() - && !_processingReplyItem->isEphemeral()) { + && (!_processingReplyItem->isEphemeral() + || _processingReplyItem->out())) { return processCancel(); } else if (const auto forum = _peer->forum() ; forum && _processingReplyItem->history() == _history) { diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 720880088a..68b9bbee8e 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -631,7 +631,8 @@ bool AddReplyToMessageAction( const auto topic = item ? item->topic() : nullptr; const auto peer = item ? item->history()->peer.get() : nullptr; if (!item - || (!item->isRegular() && !item->isEphemeral()) + || (!item->isRegular() + && (!item->isEphemeral() || item->out())) || (context != Context::History && context != Context::Replies && context != Context::Monoforum)) {