Skip to content

Add optional filename field to image, audio, and video messages#114

Open
spantaleev wants to merge 1 commit into
Nheko-Reborn:masterfrom
spantaleev:media-filename
Open

Add optional filename field to image, audio, and video messages#114
spantaleev wants to merge 1 commit into
Nheko-Reborn:masterfrom
spantaleev:media-filename

Conversation

@spantaleev

Copy link
Copy Markdown
Contributor

Matrix media-caption semantics use the filename field to distinguish between a caption in body and the original upload filename.

This was already supported for m.file, but missing from m.image, m.audio and m.video.

This patch adds filename to all three message types, matching the existing m.file implementation:

  • parsed when present
  • serialized only when non-empty

All related field comments were updatd to reflect the current Matrix media-caption semantics.

Matrix media-caption semantics use the `filename` field to distinguish
between a caption in `body` and the original upload filename.

This was already supported for `m.file`, but missing from `m.image`, `m.audio` and `m.video`.

This patch adds `filename` to all three message types, matching the existing `m.file` implementation:
- parsed when present
- serialized only when non-empty

All related field comments were updatd to reflect the current Matrix media-caption semantics.
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