Wire iOS media downloads through session bridge

This commit is contained in:
Mikhail Kilin
2026-05-21 00:29:47 +03:00
parent 4fd2a18ed9
commit 892582df67
8 changed files with 50 additions and 2 deletions

View File

@@ -63,6 +63,12 @@ struct Smoke {
let pinned = try session.pinnedMessages(chatId: chat.id)
require(pinned.first?.text == "Hello from fake TDLib", "expected pinned message")
let photo = try session.downloadPhoto(fileId: 100)
require(photo.path == "/tmp/fake-photo.jpg", "expected downloaded photo path")
let voice = try session.downloadVoice(fileId: 200)
require(voice.path == "/tmp/fake-voice.ogg", "expected downloaded voice path")
let sent = try session.sendMessage(chatId: chat.id, text: "Hi from Swift FFI", replyToMessageId: nil)
require(sent.text == "Hi from Swift FFI", "expected sent message text")