From 52721847f4a4422e715365df9edb924731adb001 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 15 Sep 2021 12:03:27 +0300 Subject: [PATCH] Fix outgoing voice message unread mark. --- Telegram/SourceFiles/api/api_sending.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/api/api_sending.cpp b/Telegram/SourceFiles/api/api_sending.cpp index 77a4c6eae..1858eae33 100644 --- a/Telegram/SourceFiles/api/api_sending.cpp +++ b/Telegram/SourceFiles/api/api_sending.cpp @@ -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()