diff --git a/Telegram/NotificationService/Serialization.m b/Telegram/NotificationService/Serialization.m index f137bbe5df..fbdf7c11ba 100644 --- a/Telegram/NotificationService/Serialization.m +++ b/Telegram/NotificationService/Serialization.m @@ -1,5 +1,5 @@ #import "Serialization.h" - +f @implementation Serialization - (NSUInteger)currentLayer { diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 4b047e2931..6b88380a9d 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -5789,8 +5789,8 @@ Any member of this group will be able to see messages in the channel."; "Conversation.TitleCommentsFormat" = "%1$@ %2$@"; "Conversation.TitleRepliesEmpty" = "Replies"; -"Conversation.TitleReplies_1" = "[%@]Comment"; -"Conversation.TitleReplies_any" = "[%@]Comments"; +"Conversation.TitleReplies_1" = "[%@]Reply"; +"Conversation.TitleReplies_any" = "[%@]Replies"; "Conversation.TitleRepliesFormat" = "%1$@ %2$@"; "Conversation.MessageLeaveComment" = "Leave a Comment"; diff --git a/submodules/TelegramCore/Sources/ReplyThreadHistory.swift b/submodules/TelegramCore/Sources/ReplyThreadHistory.swift index a402d81079..762c832503 100644 --- a/submodules/TelegramCore/Sources/ReplyThreadHistory.swift +++ b/submodules/TelegramCore/Sources/ReplyThreadHistory.swift @@ -178,9 +178,17 @@ private class ReplyThreadHistoryContextImpl { resolvedMaxMessage = nil } + var isChannelPost = false + for attribute in topMessage.attributes { + if let _ = attribute as? SourceReferenceMessageAttribute { + isChannelPost = true + break + } + } + return .single(DiscussionMessage( messageId: parsedIndex.id, - isChannelPost: true, + isChannelPost: isChannelPost, maxMessage: resolvedMaxMessage, maxReadIncomingMessageId: readInboxMaxId.flatMap { readMaxId in MessageId(peerId: parsedIndex.id.peerId, namespace: Namespaces.Message.Cloud, id: readMaxId) @@ -472,9 +480,17 @@ public func fetchChannelReplyThreadMessage(account: Account, messageId: MessageI resolvedMaxMessage = nil } + var isChannelPost = false + for attribute in topMessage.attributes { + if let _ = attribute as? SourceReferenceMessageAttribute { + isChannelPost = true + break + } + } + return DiscussionMessage( messageId: parsedIndex.id, - isChannelPost: true, + isChannelPost: isChannelPost, maxMessage: resolvedMaxMessage, maxReadIncomingMessageId: readInboxMaxId.flatMap { readMaxId in MessageId(peerId: parsedIndex.id.peerId, namespace: Namespaces.Message.Cloud, id: readMaxId) @@ -511,6 +527,7 @@ public func fetchChannelReplyThreadMessage(account: Account, messageId: MessageI guard let discussionMessageId = foundDiscussionMessageId else { return nil } + return DiscussionMessage( messageId: discussionMessageId, isChannelPost: true,