← Back to PRs

#5810: feat(imessage): add myNumbers config to filter by destination phone number

by commander-alexander open 2026-02-01 00:55 View on GitHub →
channel: imessage
Adds a `myNumbers` config option to the iMessage channel that filters inbound messages by destination caller ID. This allows agents with multiple phone numbers to only respond to messages sent to specific numbers. ## Changes - Added `myNumbers: string[]` to iMessage channel config schema - Filters inbound messages where `destination_caller_id` matches configured numbers - Logs skipped messages for debugging ## Dependency Requires [steipete/imsg#29](https://github.com/steipete/imsg/pull/29) to expose the `destination_caller_id` field. --- *AI-assisted PR* <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `myNumbers: string[]` configuration option to the iMessage channel, extends the config schema to accept it, and updates the iMessage monitor to drop inbound messages whose `destination_caller_id` does not match the configured numbers. It also logs when messages are skipped to aid debugging. The change fits cleanly into the existing iMessage inbound processing path (`monitorIMessageProvider`) by applying the filter early, before allowlist/pairing/group handling. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge; changes are localized and low-risk. - The implementation is a straightforward early-return filter gated behind an optional config field, with no changes to core routing logic beyond skipping some inbound messages. Main risk is around config ergonomics/validation and runtime override expectations rather than correctness or security. - src/imessage/monitor/monitor-provider.ts <!-- greptile_other_comments_section --> <sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs