fix(imessage): drop all is_from_me messages unconditionally#1
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
iMessage reflects outbound agent messages back as inbound user messages (with control-char prefixes in some cases), causing echo reply loops. Closes openclaw#59363 upstream.
Root cause
resolveIMessageInboundDecisionhad a special path for self-chat whereis_from_me=truemessages would only be dropped if the echo-cache matched. When the cache missed (e.g. emptysentTexton media-only sends, or control-char prefixed reflections), the message passed through as a user message and triggered another agent reply.Fix
Drop all
is_from_memessages unconditionally — matching the behaviour that already existed for non-self-chat DMs and groups. TheselfChatCache.remember()call is preserved so the subsequentis_from_me=falseSQLite reflection is still caught by theselfChatCache.has()check.Files changed
extensions/imessage/src/monitor/inbound-processing.ts: collapse self-chat branch into unconditional dropFixes: openclaw#59363