Expose draft updates to iOS bridge

This commit is contained in:
Mikhail Kilin
2026-05-21 00:33:05 +03:00
parent 892582df67
commit 3e67e0d1b8
6 changed files with 48 additions and 0 deletions

View File

@@ -1303,6 +1303,13 @@ mod tests {
assert_eq!(pinned[0].text, "Hello from fake TDLib");
assert_eq!(session.download_photo(100).unwrap().path, "/tmp/fake-photo.jpg");
assert_eq!(session.download_voice(200).unwrap().path, "/tmp/fake-voice.ogg");
session
.set_draft(chats[0].id, "Draft from Rust test".to_string())
.unwrap();
assert!(session.poll_events().iter().any(|event| matches!(
event,
IosEvent::DraftChanged { draft } if draft.text == "Draft from Rust test"
)));
let sent = session
.send_message(chats[0].id, "Hi from Swift".to_string(), None)