2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Removed display views and author for sent scheduled messages.

Moved filling of post flags to a single place.
This commit is contained in:
23rd
2020-05-17 12:09:20 +03:00
committed by John Preston
parent ccbc63cd6e
commit 41255cab44
5 changed files with 40 additions and 64 deletions

View File

@@ -4677,15 +4677,7 @@ void HistoryWidget::sendFileConfirmed(
}
const auto channelPost = peer->isChannel() && !peer->isMegagroup();
const auto silentPost = file->to.options.silent;
if (channelPost) {
flags |= MTPDmessage::Flag::f_views;
flags |= MTPDmessage::Flag::f_post;
}
if (!channelPost) {
flags |= MTPDmessage::Flag::f_from_id;
} else if (peer->asChannel()->addsSignature()) {
flags |= MTPDmessage::Flag::f_post_author;
}
Api::FillMessagePostFlags(action, peer, flags);
if (silentPost) {
flags |= MTPDmessage::Flag::f_silent;
}