diff options
| author | dltn <6599399+dltn@users.noreply.github.com> | 2026-09-30 15:34:53 -0400 |
|---|---|---|
| committer | dltn <6599399+dltn@users.noreply.github.com> | 2026-09-30 15:34:53 -0400 |
| commit | b6041c772138cdb3408fb4d93accd770f0ec56a1 (patch) | |
| tree | ca45474c5d719d35bcc0e97300481ea5d8e7ad20 /external_plugins/imessage/README.md | |
| parent | 2a8ad9f74633d10e3d9bb0660a03bfc6e50584b1 (diff) | |
imessage: surface every inbound image, not just the firstdltn/imessage-multi-image
An iMessage with several photos arrived with only the first one in the
channel tag: handleInbound took the first image attachment and stopped.
Collect every image attachment instead (same filters as before) and pass
each path in the notification meta as image_path, image_path_2,
image_path_3, ... so the model can Read all of them. A single image still
produces exactly image_path, so existing behaviour is unchanged.
Numbered keys rather than an array or a joined list: Claude Code accepts
only string values in channel meta and renders each key as an attribute
on the <channel> tag, so keys must be plain identifiers; one key per path
also avoids inventing a delimiter for sender-controlled filenames. The
attachments query gains ORDER BY a.ROWID so the numbering follows
attachment ROWID (creation) order. Instructions and README updated to
match; version 0.1.0 -> 0.2.0 in plugin.json and package.json.
Known limits, unchanged by this patch: attachments still downloading
when the message row is first polled (filename NULL) are skipped and,
since the poll watermark has already passed the message, never picked up
later; HEIC is passed through unconverted; attachments with a NULL
mime_type still pass the image filter; no cap on images per message.
Diffstat (limited to 'external_plugins/imessage/README.md')
| -rw-r--r-- | external_plugins/imessage/README.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/external_plugins/imessage/README.md b/external_plugins/imessage/README.md index 53f66669..d512dd65 100644 --- a/external_plugins/imessage/README.md +++ b/external_plugins/imessage/README.md @@ -55,7 +55,7 @@ Handles are phone numbers (`+15551234567`) or Apple ID emails (`them@icloud.com` | **Inbound** | Polls `chat.db` once a second for `ROWID > watermark`. Watermark initializes to `MAX(ROWID)` at boot — old messages aren't replayed on restart. | | **Outbound** | `osascript` with `tell application "Messages" to send …`. Text and chat GUID pass through argv so there's no escaping footgun. | | **History & search** | Direct SQLite queries against `chat.db`. Full history — not just messages since the server started. | -| **Attachments** | `chat.db` stores absolute filesystem paths. The first inbound image per message is surfaced to the assistant as a local path it can `Read`. Outbound attachments send as separate messages after the text. | +| **Attachments** | `chat.db` stores absolute filesystem paths. Every inbound image in a message is surfaced to the assistant as a local path it can `Read` (`image_path`, `image_path_2`, …). Outbound attachments send as separate messages after the text. | ## Environment variables |
