Skip to content

Show image captions in desktop notifications - #746

Closed
tayfuryldz wants to merge 2 commits into
ulyssa:mainfrom
tayfuryldz:fix/733-notification-caption
Closed

tayfuryldz wants to merge 2 commits into
ulyssa:mainfrom
tayfuryldz:fix/733-notification-caption

Conversation

@tayfuryldz

Copy link
Copy Markdown
Contributor

Closes #733

What changed

  • show an image's caption in desktop notifications when Matrix provides a distinct filename
  • keep the existing generic notification when body is only the filename
  • add focused tests for caption and filename-only cases

Why

Matrix uses body as a user-written media caption when filename is present and differs from it. iamb currently discards that caption and always shows sent an image.

Testing

  • focused helper cases are included as unit tests
  • full cargo test was not run locally because this change was prepared without downloading the repository/dependencies; CI should provide the repository build/test validation

Comment thread src/notifications.rs Outdated
Comment thread src/notifications.rs Outdated
@tayfuryldz

Copy link
Copy Markdown
Contributor Author

Updated both points: captions are now labeled by attachment type (for example, Image: Sunset), and the same caption handling covers audio, file, image, and video messages. Filename-only attachments keep the existing generic notification text.

@VAWVAW VAWVAW left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please rebase this branch so I can merge it.

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.

Show image caption in desktop notification

2 participants