mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix scheduled replies
This commit is contained in:
@@ -729,7 +729,7 @@ extension StoreMessage {
|
||||
threadId = Int64(threadIdValue.id)
|
||||
}
|
||||
}
|
||||
attributes.append(ReplyMessageAttribute(messageId: MessageId(peerId: replyPeerId, namespace: namespace, id: replyToMsgId), threadMessageId: threadMessageId, quote: quote, isQuote: isQuote))
|
||||
attributes.append(ReplyMessageAttribute(messageId: MessageId(peerId: replyPeerId, namespace: Namespaces.Message.Cloud, id: replyToMsgId), threadMessageId: threadMessageId, quote: quote, isQuote: isQuote))
|
||||
}
|
||||
if let replyHeader = replyHeader {
|
||||
attributes.append(QuotedReplyMessageAttribute(apiHeader: replyHeader, quote: quote, isQuote: isQuote))
|
||||
@@ -871,7 +871,7 @@ extension StoreMessage {
|
||||
attributes.append(InlineBusinessBotMessageAttribute(peerId: PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(viaBusinessBotId)), title: nil))
|
||||
}
|
||||
|
||||
if namespace != Namespaces.Message.ScheduledCloud && namespace != Namespaces.Message.QuickReplyCloud {
|
||||
if !Namespaces.Message.allNonRegular.contains(namespace) {
|
||||
if let views = views {
|
||||
attributes.append(ViewCountMessageAttribute(count: Int(views)))
|
||||
}
|
||||
|
||||
@@ -139,7 +139,13 @@ func applyUpdateMessage(postbox: Postbox, stateManager: AccountStateManager, mes
|
||||
let text: String
|
||||
let forwardInfo: StoreMessageForwardInfo?
|
||||
let threadId: Int64?
|
||||
if let apiMessage = apiMessage, let apiMessagePeerId = apiMessage.peerId, let updatedMessage = StoreMessage(apiMessage: apiMessage, accountPeerId: accountPeerId, peerIsForum: transaction.getPeer(apiMessagePeerId)?.isForum ?? false) {
|
||||
|
||||
var namespace = Namespaces.Message.Cloud
|
||||
if message.id.namespace == Namespaces.Message.ScheduledLocal {
|
||||
namespace = Namespaces.Message.ScheduledCloud
|
||||
}
|
||||
|
||||
if let apiMessage = apiMessage, let apiMessagePeerId = apiMessage.peerId, let updatedMessage = StoreMessage(apiMessage: apiMessage, accountPeerId: accountPeerId, peerIsForum: transaction.getPeer(apiMessagePeerId)?.isForum ?? false, namespace: namespace) {
|
||||
media = updatedMessage.media
|
||||
attributes = updatedMessage.attributes
|
||||
text = updatedMessage.text
|
||||
|
||||
Reference in New Issue
Block a user