Skip to content

v1.13.0 — messages-bridge: file attachments

Latest

Choose a tag to compare

@tstoegi tstoegi released this 05 Sep 10:29

messages-bridge send can now attach files — iMessage was text-only until now.

messages-bridge send <handle> <text> [/path/to/attachment ...]
# text plus files
messages-bridge send "+491701234567" "Here are the documents" ~/Documents/offer.pdf ~/Documents/terms.pdf

# files only — pass an empty text
messages-bridge send "ben@example.com" "" ~/Pictures/floorplan.png

The text is sent first, then one message per file — that is how Messages.app delivers attachments, not a choice made here. ~ and relative paths are expanded to the absolute form POSIX file requires. The SMS fallback path behaves identically.

Every file is validated before anything is sent. A missing file, or a directory passed instead of a file, exits with an error and sends nothing — a typo in the third path cannot leave the first two already delivered, since there is no way to unsend them.

Breaking change

<text> is now a single argument, matching mail-bridge send <to> <subject> <body> [attachments...]. Previously everything after the handle was joined into the message body.

messages-bridge send "+49..." "two words"     # correct
messages-bridge send "+49..." two words       # now fails: "words" is read as a file path

Unquoted multi-word text now aborts with attachment not found and a hint to quote it, rather than being silently reinterpreted. This is what makes trailing file paths unambiguous.