Skip to content

fix(parser): detect iOS <attached: media messages#76

Closed
rodrigogs wants to merge 5 commits into
devfrom
fix/issue-75-ios-attached-media-indicator
Closed

fix(parser): detect iOS <attached: media messages#76
rodrigogs wants to merge 5 commits into
devfrom
fix/issue-75-ios-attached-media-indicator

Conversation

@rodrigogs

@rodrigogs rodrigogs commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add iOS media marker <attached: to MEDIA_INDICATORS
  • Add all 41 localized iOS variants (30+ languages) sourced from WhatsApp Localizable.strings (v22.24.81, key zQ+5d)
  • Include fullwidth colon variants for Chinese and Japanese exports
  • Include parser fixture for iOS attached syntax in examples/parser-tests
  • Update parser test README with iOS indicators per language

Why

iOS WhatsApp exports use <attached: filename.ext> for media messages, which was not recognized by the parser. Media lines were rendered as plain text instead of being linked and playable. The localized keyword varies by language (e.g., <Anhang: in German, <adjunto: in Spanish, <allegato: in Italian).

Languages covered

English, German (2 variants), Spanish, Catalan, Italian, Portuguese (PT + BR), French, Dutch, Swedish, Norwegian, Danish, Finnish, Irish, Czech, Slovak, Polish, Hungarian, Romanian, Croatian/Slovenian, Turkish, Vietnamese, Indonesian, Malay, Russian, Ukrainian, Greek, Arabic, Persian, Urdu, Hebrew, Hindi, Marathi, Gujarati, Thai, Chinese (+ fullwidth colon), Japanese (+ fullwidth colon), Korean

Validation

  • npm run check — 0 errors
  • npm run lint — 0 issues
  • npm run build — exit 0

rodrigogs and others added 2 commits March 3, 2026 10:17
- Add date pattern to recognize YYYY/MM/DD, HH:MM AM/PM format
- Fixes issue #69 where Asian format with 12-hour time was not recognized
- Add parser test case for the YYYY/MM/DD AM/PM format
- Update parser tests README with format documentation
## [1.29.3](v1.29.2...v1.29.3) (2026-03-03)

### Bug Fixes

* add support for YYYY/MM/DD format with 12-hour AM/PM time ([4223d81](4223d81)), closes [#69](#69)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:' to MEDIA_INDICATORS in chat-parser.ts so iOS-format media lines are correctly flagged as media messages
  • Added examples/parser-tests/ios-attached-media-test.txt as a sample fixture containing iOS <attached:> lines for both audio and image
  • Updated examples/parser-tests/README.md to 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

Comment thread examples/parser-tests/ios-attached-media-test.txt
Comment thread examples/parser-tests/README.md Outdated
@rodrigogs

Copy link
Copy Markdown
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Lint and build before finishing.

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread src/lib/parser/chat-parser.ts Outdated
'<媒体省略>',
'<미디어 생략>',
'<Медиа пропущены>',
'<attached:',

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Add 41 iOS media indicator variants covering 30+ languages,
sourced from WhatsApp Localizable.strings (v22.24.81, key zQ+5d).
Includes fullwidth colon variants for Chinese and Japanese exports.
@rodrigogs rodrigogs force-pushed the fix/issue-75-ios-attached-media-indicator branch from 410e369 to 0d3ac4c Compare March 31, 2026 20:10
@rodrigogs

Copy link
Copy Markdown
Owner Author

Merged to main as v1.29.4.

@rodrigogs rodrigogs closed this Mar 31, 2026
@rodrigogs rodrigogs deleted the fix/issue-75-ios-attached-media-indicator branch April 1, 2026 21:24
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.

4 participants