mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Update submodules
This commit is contained in:
parent
59e79e08ea
commit
f50b574a79
@ -452,7 +452,7 @@ private func loadLegacyMessages(account: TemporaryAccount, basePath: String, acc
|
|||||||
copyLocalFiles.append((resource, path))
|
copyLocalFiles.append((resource, path))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, mimeType: "video/mp4", size: size == 0 ? nil : Int(size), attributes: attributes))
|
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, immediateThumbnailData: nil, mimeType: "video/mp4", size: size == 0 ? nil : Int(size), attributes: attributes))
|
||||||
} else if let item = item as? TGAudioMediaAttachment {
|
} else if let item = item as? TGAudioMediaAttachment {
|
||||||
let mediaId = MediaId(namespace: Namespaces.Media.LocalImage, id: arc4random64())
|
let mediaId = MediaId(namespace: Namespaces.Media.LocalImage, id: arc4random64())
|
||||||
let representations: [TelegramMediaImageRepresentation] = []
|
let representations: [TelegramMediaImageRepresentation] = []
|
||||||
@ -473,7 +473,7 @@ private func loadLegacyMessages(account: TemporaryAccount, basePath: String, acc
|
|||||||
} else if audioUrl.hasPrefix("file://"), let path = URL(string: audioUrl)?.path {
|
} else if audioUrl.hasPrefix("file://"), let path = URL(string: audioUrl)?.path {
|
||||||
copyLocalFiles.append((resource, path))
|
copyLocalFiles.append((resource, path))
|
||||||
}
|
}
|
||||||
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, mimeType: "audio/ogg", size: size == 0 ? nil : Int(size), attributes: attributes))
|
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, immediateThumbnailData: nil, mimeType: "audio/ogg", size: size == 0 ? nil : Int(size), attributes: attributes))
|
||||||
} else if let item = item as? TGDocumentMediaAttachment {
|
} else if let item = item as? TGDocumentMediaAttachment {
|
||||||
let mediaId = MediaId(namespace: Namespaces.Media.LocalImage, id: arc4random64())
|
let mediaId = MediaId(namespace: Namespaces.Media.LocalImage, id: arc4random64())
|
||||||
var representations: [TelegramMediaImageRepresentation] = []
|
var representations: [TelegramMediaImageRepresentation] = []
|
||||||
@ -541,7 +541,7 @@ private func loadLegacyMessages(account: TemporaryAccount, basePath: String, acc
|
|||||||
} else if item.documentId != 0 {
|
} else if item.documentId != 0 {
|
||||||
copyLocalFiles.append((resource, pathFromLegacyFile(basePath: basePath, fileId: item.documentId, isLocal: false, fileName: TGDocumentMediaAttachment.safeFileName(forFileName: fileName) ?? "")))
|
copyLocalFiles.append((resource, pathFromLegacyFile(basePath: basePath, fileId: item.documentId, isLocal: false, fileName: TGDocumentMediaAttachment.safeFileName(forFileName: fileName) ?? "")))
|
||||||
}
|
}
|
||||||
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, mimeType: item.mimeType ?? "application/octet-stream", size: size == 0 ? nil : Int(size), attributes: attributes))
|
parsedMedia.append(TelegramMediaFile(fileId: mediaId, partialReference: nil, resource: resource, previewRepresentations: representations, immediateThumbnailData: nil, mimeType: item.mimeType ?? "application/octet-stream", size: size == 0 ? nil : Int(size), attributes: attributes))
|
||||||
} else if let item = item as? TGActionMediaAttachment {
|
} else if let item = item as? TGActionMediaAttachment {
|
||||||
if item.actionType == TGMessageActionEncryptedChatMessageLifetime, let actionData = item.actionData, let timeout = actionData["messageLifetime"] as? Int32 {
|
if item.actionType == TGMessageActionEncryptedChatMessageLifetime, let actionData = item.actionData, let timeout = actionData["messageLifetime"] as? Int32 {
|
||||||
|
|
||||||
|
|||||||
@ -742,7 +742,7 @@ final class WatchAudioHandler: WatchRequestHandler {
|
|||||||
replyMessageId = MessageId(peerId: peerId, namespace: Namespaces.Message.Cloud, id: replyToMid)
|
replyMessageId = MessageId(peerId: peerId, namespace: Namespaces.Message.Cloud, id: replyToMid)
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = enqueueMessages(account: account, peerId: peerId, messages: [.message(text: "", attributes: [], mediaReference: .standalone(media: TelegramMediaFile(fileId: MediaId(namespace: Namespaces.Media.LocalFile, id: randomId), partialReference: nil, resource: resource, previewRepresentations: [], mimeType: "audio/ogg", size: data.count, attributes: [.Audio(isVoice: true, duration: Int(duration), title: nil, performer: nil, waveform: nil)])), replyToMessageId: replyMessageId, localGroupingKey: nil)]).start()
|
let _ = enqueueMessages(account: account, peerId: peerId, messages: [.message(text: "", attributes: [], mediaReference: .standalone(media: TelegramMediaFile(fileId: MediaId(namespace: Namespaces.Media.LocalFile, id: randomId), partialReference: nil, resource: resource, previewRepresentations: [], immediateThumbnailData: nil, mimeType: "audio/ogg", size: data.count, attributes: [.Audio(isVoice: true, duration: Int(duration), title: nil, performer: nil, waveform: nil)])), replyToMessageId: replyMessageId, localGroupingKey: nil)]).start()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit e6a63b7875a58869294b4e5101de3959574b20f0
|
Subproject commit adef00bd6ea693d50282e8b7e7083b15c0c1bd75
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit afc97ff44cf40c6c5a14264eebb40b8c102c38a7
|
Subproject commit eb191a8e8e19752e914e29b5054a0b631f8b1d46
|
||||||
Loading…
x
Reference in New Issue
Block a user