Don't try adding effects to forwarded messages.

This commit is contained in:
John Preston 2024-06-01 22:49:51 +04:00
parent bb79a07262
commit ee680ac1f1
2 changed files with 6 additions and 2 deletions

View File

@ -3383,7 +3383,9 @@ void ApiWrap::forwardMessages(
.date = HistoryItem::NewMessageDate(action.options),
.shortcutId = action.options.shortcutId,
.postAuthor = messagePostAuthor,
.effectId = action.options.effectId,
// forwarded messages don't have effects
//.effectId = action.options.effectId,
}, item);
_session->data().registerMessageRandomId(randomId, newId);
if (!localIds) {

View File

@ -4224,7 +4224,9 @@ SendMenu::Details HistoryWidget::sendMenuDetails() const {
: HistoryView::CanScheduleUntilOnline(_peer)
? SendMenu::Type::ScheduledToUser
: SendMenu::Type::Scheduled;
const auto effectAllowed = _peer && _peer->isUser();
const auto effectAllowed = _peer
&& _peer->isUser()
&& (HasSendText(_field) || _previewDrawPreview);
return { .type = type, .effectAllowed = effectAllowed };
}