fix(parser): detect iOS <attached: media messages#76
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a parser bug where iOS WhatsApp export lines using the <attached: filename.ext> format were not being recognized as media messages, causing them to render as plain text instead of being linked and playable. The fix adds the <attached: prefix to the existing MEDIA_INDICATORS list, which is already used with a prefix/substring match, so the change correctly handles any <attached: …> content. A parser test fixture and README documentation update are also included.
Changes:
- Added
'<attached:'toMEDIA_INDICATORSinchat-parser.tsso iOS-format media lines are correctly flagged as media messages - Added
examples/parser-tests/ios-attached-media-test.txtas a sample fixture containing iOS<attached:>lines for both audio and image - Updated
examples/parser-tests/README.mdto document the new iOS<attached:>indicator under "Media Indicators Supported"
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/lib/parser/chat-parser.ts |
Adds '<attached:' to MEDIA_INDICATORS to detect iOS-style attached media lines |
examples/parser-tests/ios-attached-media-test.txt |
New fixture with iOS <attached:> messages (audio + image) for manual testing |
examples/parser-tests/README.md |
Documents the new <attached:> media indicator in the supported indicators list |
|
@copilot open a new pull request to apply changes based on the comments in this thread Lint and build before finishing. |
|
@rodrigogs I've opened a new pull request, #77, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: rodrigogs <2362425+rodrigogs@users.noreply.github.com>
| '<媒体省略>', | ||
| '<미디어 생략>', | ||
| '<Медиа пропущены>', | ||
| '<attached:', |
There was a problem hiding this comment.
The PR description states "Closes #75", but issue #75 is about voice transcription (Whisper), not about iOS <attached: media messages. This appears to be the wrong issue number referenced. If there is a separate issue tracking the <attached: iOS media bug, the correct issue number should be used. If there is no separate issue, the "Closes #75" reference should be removed from the PR description, as it will incorrectly close an unrelated issue upon merge.
Summary
<attached:toMEDIA_INDICATORSexamples/parser-testsWhy
Issue #75 reports media lines rendered as plain text like
<attached: ...>in iOS exports, which prevents media linking and playback.Validation
false -> truedetection when<attached:is presentCloses #75