Skip to content

fix: match isSelfSender on MRI suffix, not exact equality - #15

Merged
TheSinding merged 1 commit into
mainfrom
fix/self-sender-contact-url
Aug 6, 2026
Merged

fix: match isSelfSender on MRI suffix, not exact equality#15
TheSinding merged 1 commit into
mainfrom
fix/self-sender-contact-url

Conversation

@TheSinding

Copy link
Copy Markdown
Owner

message.From is sometimes the bare MRI (8:orgid:<guid>) and sometimes a full contact URL ending in it (https://.../users/ME/contacts/8:orgid:<guid>), confirmed against live message data. isSelfSender's exact-equality check never matched the URL form, so the self-author backfill added in #14 silently never fired for messages sent via Send() in a real 1:1 conversation.

Fix: match on suffix instead of exact equality, in both the direct-MRI and ObjectID-derived branches. Backward compatible with the existing bare-MRI test cases; adds a regression test using the real URL shape.

Follow-up to #14.

message.From is sometimes the bare MRI (8:orgid:<guid>) and sometimes a
full contact URL ending in it
(https://.../users/ME/contacts/8:orgid:<guid>), confirmed against live
message data. isSelfSender's exact-equality check never matched the URL
form, so the self-author backfill added in #14 silently never fired for
messages sent via Send() in a real 1:1 conversation.
@TheSinding
TheSinding merged commit fe4ff2a into main Aug 6, 2026
2 checks passed
@TheSinding
TheSinding deleted the fix/self-sender-contact-url branch August 6, 2026 10:00
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