Skip to content

MSC2530: Body field as media caption#2530

Merged
turt2live merged 11 commits into
matrix-org:old_masterfrom
tulir:body-as-caption
Feb 19, 2024
Merged

MSC2530: Body field as media caption#2530
turt2live merged 11 commits into
matrix-org:old_masterfrom
tulir:body-as-caption

Conversation

@tulir

@tulir tulir commented May 7, 2020

Copy link
Copy Markdown
Member

Rendered

Implementations:

Signed-off-by: Tulir Asokan tulir@maunium.net


FCP tickyboxes

@turt2live turt2live added kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal. Process state. proposal-in-review labels May 7, 2020
@turt2live turt2live self-requested a review May 7, 2020 16:39
Comment thread proposals/2530-body-as-caption.md Outdated
Comment thread proposals/2530-body-as-caption.md Outdated
Comment on lines +37 to +38
name. To avoid this problem, we could require that `body` and `filename` must
be different for `body` to be interpreted as a caption.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Another thing to note here is that body is required, so the filename is probably a reasonable fallback for body in the event that no description is given.

@turt2live turt2live removed their request for review November 10, 2020 05:28
MurzNN added a commit to MurzNN/matrix-spec-proposals that referenced this pull request Nov 27, 2020
MurzNN added a commit to MurzNN/matrix-spec-proposals that referenced this pull request Nov 30, 2020
MurzNN added a commit to MurzNN/matrix-spec-proposals that referenced this pull request Nov 30, 2020
@turt2live turt2live added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 8, 2021
@theotheroracle

This comment was marked as off-topic.

@MurzNN

This comment was marked as off-topic.

@turt2live

Copy link
Copy Markdown
Member

Please use comments on the diff to receive replies.

@MurzNN

MurzNN commented Jun 14, 2022

Copy link
Copy Markdown
Contributor

Yeah, sorry, and seems this MSC is ok, so I've commented a diff in the most suitable MSC here: #2529 (comment)

@mscbot

mscbot commented Feb 19, 2024

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

@mscbot mscbot added finished-final-comment-period FCP has finished. Process state. and removed disposition-merge Process state. final-comment-period Process state to accept, reject, or postpone an MSC. labels Feb 19, 2024
@turt2live turt2live merged commit ea24933 into matrix-org:old_master Feb 19, 2024
@turt2live turt2live added spec-pr-missing MSC is accepted, but missing spec PR. Process state. and removed finished-final-comment-period FCP has finished. Process state. labels Feb 19, 2024
turt2live pushed a commit that referenced this pull request Feb 19, 2024
* Proposal to use body field as media caption

* Add paragraph about relation-based captions being difficult for bridges

* Clarify how to treat body when filename is not present

* Refactor proposal text

* Fix heading size

* Add problem statement

* Add links to and quotes from current spec

* Adjust wording and quote m.audio body spec

* Clarify that m.location and m.sticker are out of scope for this proposal

* Add examples and summary of changes

* Fix JSON syntax in example
@turt2live

Copy link
Copy Markdown
Member

Spec PR: matrix-org/matrix-spec#1731

@turt2live turt2live added spec-pr-in-review A proposal which has been PR'd against the spec and is in review and removed spec-pr-missing MSC is accepted, but missing spec PR. Process state. labels Feb 25, 2024
@turt2live

Copy link
Copy Markdown
Member

Merged 🎉

@turt2live turt2live added merged A proposal whose PR has merged into the spec! Process state. and removed spec-pr-in-review A proposal which has been PR'd against the spec and is in review labels Feb 26, 2024
bnjbvr pushed a commit to matrix-org/matrix-rust-sdk that referenced this pull request Mar 19, 2024
Now that there is some support for [MSC2530](matrix-org/matrix-spec-proposals#2530), I gave adding sending captions a try. ( This is my first time with Rust 😄  )

I tried it on Element X with a hardcoded caption and it seems to work well
![image](https://github.com/matrix-org/matrix-rust-sdk/assets/683652/597e5ebf-f7f2-498f-97a4-ac98613c1134)

(It even got forwarded through mautrix-whatsapp and the caption was visible on the Whatsapp side)

---

* ffi: Expose filename and formatted body fields for media captions

In relevance to MSC2530

* MSC2530: added the ability to send media with captions

Signed-off-by: Marco Antonio Alvarez <surakin@gmail.com>

* signoff

Signed-off-by: Marco Antonio Alvarez <surakin@gmail.com>

* fixing the import messup

* fix missing parameters in documentation

* fix formatting

* move optional parameters to the end

* more formatting fixes

* more formatting fixes

* rename url parameter to filename in send_attachment and helpers

* fix send_attachment documentation example

* move caption and formatted_caption into attachmentconfig

* fix formatting

* fix formatting

* fix formatting (hopefully the last one)

* updated stale comments

* simplify attachment message comments

---------

Signed-off-by: Marco Antonio Alvarez <surakin@gmail.com>
Co-authored-by: SpiritCroc <dev@spiritcroc.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature MSC for not-core and not-maintenance stuff merged A proposal whose PR has merged into the spec! Process state. proposal A matrix spec change proposal. Process state.

Projects

Status: Merged/Done
Status: Done for now

Development

Successfully merging this pull request may close these issues.

10 participants