mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix schedule until online when the recipient is already online
This commit is contained in:
@@ -380,7 +380,6 @@ func enqueueMessages(transaction: Transaction, account: Account, peerId: PeerId,
|
||||
for attribute in attributes {
|
||||
if let attribute = attribute as? OutgoingScheduleInfoMessageAttribute {
|
||||
if attribute.scheduleTime == scheduleWhenOnlineTimestamp, let presence = peerPresence as? TelegramUserPresence, case let .present(statusTimestamp) = presence.status, statusTimestamp >= timestamp {
|
||||
|
||||
} else {
|
||||
messageNamespace = Namespaces.Message.ScheduledLocal
|
||||
effectiveTimestamp = attribute.scheduleTime
|
||||
@@ -526,7 +525,6 @@ func enqueueMessages(transaction: Transaction, account: Account, peerId: PeerId,
|
||||
}
|
||||
if let attribute = attribute as? OutgoingScheduleInfoMessageAttribute {
|
||||
if attribute.scheduleTime == scheduleWhenOnlineTimestamp, let presence = peerPresence as? TelegramUserPresence, case let .present(statusTimestamp) = presence.status, statusTimestamp >= timestamp {
|
||||
|
||||
} else {
|
||||
messageNamespace = Namespaces.Message.ScheduledLocal
|
||||
effectiveTimestamp = attribute.scheduleTime
|
||||
|
||||
Reference in New Issue
Block a user