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

Support group-like channels.

This commit is contained in:
John Preston
2024-08-13 13:51:11 +02:00
parent 24a7e48b75
commit 9ea495f59d
17 changed files with 152 additions and 46 deletions

View File

@@ -41,14 +41,14 @@ void InnerFillMessagePostFlags(
const SendOptions &options,
not_null<PeerData*> peer,
MessageFlags &flags) {
const auto anonymousPost = peer->amAnonymous();
if (ShouldSendSilent(peer, options)) {
flags |= MessageFlag::Silent;
}
if (!anonymousPost || options.sendAs) {
if (!peer->amAnonymous()) {
flags |= MessageFlag::HasFromId;
return;
} else if (peer->asMegagroup()) {
}
const auto channel = peer->asBroadcast();
if (!channel) {
return;
}
flags |= MessageFlag::Post;
@@ -57,7 +57,7 @@ void InnerFillMessagePostFlags(
return;
}
flags |= MessageFlag::HasViews;
if (peer->asChannel()->addsSignature()) {
if (channel->addsSignature()) {
flags |= MessageFlag::HasPostAuthor;
}
}