From ced5da042dfa08cab13eb9c4c9ce6e60bd73f7eb Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 29 Jul 2019 03:06:14 +0300 Subject: [PATCH] Fixed message replies --- .../TelegramCore/PendingMessageManager.swift | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/submodules/TelegramCore/TelegramCore/PendingMessageManager.swift b/submodules/TelegramCore/TelegramCore/PendingMessageManager.swift index d892734dd1..b1c5f9530e 100644 --- a/submodules/TelegramCore/TelegramCore/PendingMessageManager.swift +++ b/submodules/TelegramCore/TelegramCore/PendingMessageManager.swift @@ -900,20 +900,7 @@ public final class PendingMessageManager { var replyMessageId: Int32? var flags: Int32 = 0 - - if case .forward = content.content { - - } else { - flags |= (1 << 7) - - if let _ = replyMessageId { - flags |= Int32(1 << 0) - } - if let _ = messageEntities { - flags |= Int32(1 << 3) - } - } - + for attribute in message.attributes { if let replyAttribute = attribute as? ReplyMessageAttribute { replyMessageId = replyAttribute.messageId.id @@ -934,6 +921,18 @@ public final class PendingMessageManager { } } + if case .forward = content.content { + } else { + flags |= (1 << 7) + + if let _ = replyMessageId { + flags |= Int32(1 << 0) + } + if let _ = messageEntities { + flags |= Int32(1 << 3) + } + } + let dependencyTag = PendingMessageRequestDependencyTag(messageId: messageId) let sendMessageRequest: Signal, MTRpcError>