2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Send GIFs search results without "via @bot".

This commit is contained in:
John Preston
2022-03-07 11:08:52 +04:00
parent eb72b1a925
commit 173fdf8056
3 changed files with 6 additions and 1 deletions

View File

@@ -3591,6 +3591,9 @@ void ApiWrap::sendInlineResult(
flags |= MessageFlag::IsOrWasScheduled;
sendFlags |= MTPmessages_SendInlineBotResult::Flag::f_schedule_date;
}
if (action.options.hideViaBot) {
sendFlags |= MTPmessages_SendInlineBotResult::Flag::f_hide_via;
}
const auto sendAs = action.options.sendAs;
const auto messageFromId = sendAs
@@ -3612,7 +3615,7 @@ void ApiWrap::sendInlineResult(
newId.msg,
messageFromId,
HistoryItem::NewMessageDate(action.options.scheduled),
bot ? peerToUser(bot->id) : 0,
(bot && !action.options.hideViaBot) ? peerToUser(bot->id) : 0,
action.replyTo,
messagePostAuthor);