Hide "via" markup when using gif tab
This commit is contained in:
parent
3cf6384bed
commit
7505a6c6fc
3 changed files with 8 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ struct SendOptions {
|
|||
bool silent = false;
|
||||
bool handleSupportSwitch = false;
|
||||
bool removeWebPageId = false;
|
||||
bool hideVia = false;
|
||||
};
|
||||
|
||||
enum class SendType {
|
||||
|
|
|
|||
|
|
@ -4862,7 +4862,11 @@ void ApiWrap::sendInlineResult(
|
|||
sendFlags |= MTPmessages_SendInlineBotResult::Flag::f_silent;
|
||||
}
|
||||
if (bot) {
|
||||
flags |= MTPDmessage::Flag::f_via_bot_id;
|
||||
if (action.options.hideVia) {
|
||||
sendFlags |= MTPmessages_SendInlineBotResult::Flag::f_hide_via;
|
||||
} else {
|
||||
flags |= MTPDmessage::Flag::f_via_bot_id;
|
||||
}
|
||||
}
|
||||
if (action.options.scheduled) {
|
||||
flags |= MTPDmessage::Flag::f_from_scheduled;
|
||||
|
|
@ -4885,7 +4889,7 @@ void ApiWrap::sendInlineResult(
|
|||
newId.msg,
|
||||
messageFromId,
|
||||
MTP_int(HistoryItem::NewMessageDate(action.options.scheduled)),
|
||||
bot ? peerToUser(bot->id) : 0,
|
||||
bot && !action.options.hideVia ? peerToUser(bot->id) : 0,
|
||||
action.replyTo,
|
||||
messagePostAuthor);
|
||||
|
||||
|
|
|
|||
|
|
@ -449,6 +449,7 @@ void GifsListWidget::selectInlineResult(
|
|||
|
||||
forceSend |= (QGuiApplication::keyboardModifiers()
|
||||
== Qt::ControlModifier);
|
||||
options.hideVia = true;
|
||||
auto item = _rows[row].items[column];
|
||||
if (const auto photo = item->getPhoto()) {
|
||||
using Data::PhotoSize;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue