Skip to content

Instagram step 3: replies from OpenChat reach the customer (ADR-0028) - #213

Merged
yatping merged 1 commit into
instagram-step-2from
instagram-step-3
Dec 3, 2026
Merged

yatping merged 1 commit into
instagram-step-2from
instagram-step-3

Conversation

@yatping

@yatping yatping commented Dec 2, 2026

Copy link
Copy Markdown
Member

Step 3 of ADR-0028, stacked on #212.

  • Sending: replies from members and the assistant go out through messenger.send and messenger_sent. They're addressed to the customer's IGSID and sent with the Page token (POST /{page-id}/messages). Each part is at most 1,000 bytes of UTF-8: replyParts now takes a size function and never splits an emoji.
  • Window: the same 24 hours as Messenger, worked out per channel. A reply after it gets 409 instagram_window_closed, and Meta's subcode 2534022 is treated as "window closed". The window is also checked when the job sends, and Try again works on Instagram.
  • Reads: an Instagram read names one message and has no watermark, so every part sent before the read's time is marked Read. Instagram sends no delivery receipts.
  • Echoes: replies typed in the Instagram app show as Sent from Instagram. Echoes of OpenChat's own replies are skipped, matched by metadata or by message ID. Unsend echoes are ignored.
  • Assistant: answers on Instagram, but not reactions or unsends.
  • API minor 13. Dashboard: reply window, failure reasons and the echo label, in 11 languages (machine-translated). Docs updated.

pnpm verify passes. Real-Cloudflare test on preview-ig is next.

🤖 Generated with Claude Code

- Replies by members and the assistant go by messenger.send to the
  customer's IGSID with the Page's token, in parts of at most 1,000
  bytes of UTF-8 (replyParts takes a size function, never splits a
  surrogate pair).
- The 24-hour window is Messenger's, read per channel_kind; past it
  409 instagram_window_closed; Meta's subcode 2534022 = window closed.
- Instagram's reads (one mid, no watermark) mark parts sent before the
  read's time as read; echoes from the Instagram app are shown as sent
  from Instagram, OpenChat's own recognised by metadata or mid.
- The assistant answers on Instagram, but not reactions or unsends.
- API minor 13. Dashboard: window, failures, echo label in 11
  languages (machine-translated). Docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Patrick Ng <yatping0617@gmail.com>
@yatping
yatping merged commit dd21fd0 into instagram-step-2 Dec 3, 2026
4 checks passed
yatping added a commit that referenced this pull request Dec 3, 2026
…#217)

Same content as #213, which was merged into its stacked base branch by mistake instead of main.

Signed-off-by: yatping <yatping0617@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant