Fix outgoing voice message unread mark.

This commit is contained in:
John Preston 2021-09-15 12:03:27 +03:00
parent e492bbb883
commit 52721847f4
1 changed files with 5 additions and 0 deletions

View File

@ -397,6 +397,11 @@ void SendConfirmedFile(
} else {
flags |= MessageFlag::LocalHistoryEntry;
}
if (file->type == SendMediaType::Audio) {
if (!peer->isChannel() || peer->isMegagroup()) {
flags |= MessageFlag::MediaIsUnread;
}
}
const auto messageFromId = anonymousPost ? 0 : session->userPeerId();
const auto messagePostAuthor = peer->isBroadcast()