Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML-formatted Media Captions not supported by Element-Android client #8936

Open
RannerDesign opened this issue Nov 5, 2024 · 0 comments
Open
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@RannerDesign
Copy link

Steps to reproduce

HTML-formatted Media Captions not supported by Element-Android client

The Client-Server-API describes in chapter 10.2.2.7 how to set up captions for media
https://spec.matrix.org/unstable/client-server-api/#media-captions

After solution of Issue 27927 Element/Web and Element/Windows are supporting unformatted and HTML-formatted captions.

IOS and Android clients currently do not support captions.

The tests were performed in the following environments:

Element Desktop on Windows 10 pro 22H2 (Build 19045.4780)
Version von Element: 1.11.83
Krypto-Version: Rust SDK 0.7.2 (7a21514), Vodozemac 0.7.0

Element Android client
Element 1.6.20 [40106202] (G-fca16b67)
Matrix SDK 1.6.20 (fca16b6)
Rust SDK 0.7.0 (fa55445), Vodozemac 0.6.0

The following server and user environment was used:

user_name:	Ranner
user_id:	@e1035z:matrix.org
room_name:	Bilder kommentieren
room_id:	!zfSEtmLSSvPqhEhQbd:matrix.org

The generation of events was performed with Python scripts using matrix-nio

Results for Element/Windows and Element/Web are now as expected: the image is shown with a formatted caption.

Result for Element/Android is unexpected: the image is shown without any caption.

241104 Screenshots Android

The sources for these events are nearly identical:

Element/Windows

{
  "content": {
    "body": "Fotograf 3871: e-Wald",
    "filename": "WP2024-06_e-Wald_[Ranner]_IMG_3871.jpg",
    "format": "org.matrix.custom.html",
    "formatted_body": "<p><strong>Fotograf 3871: </strong>e-Wald</p>",
    "info": {
      "h": 427,
      "mimetype": "image/jpeg",
      "size": 264763,
      "thumbnail_info": null,
      "thumbnail_url": null,
      "w": 640
    },
    "msgtype": "m.image",
    "url": "mxc://matrix.org/EtSVRTpGdgvKiOtvFxKHlRBp"
  },
  "origin_server_ts": 1730325027658,
  "sender": "@e1035z:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "membership": "join",
    "age": 474821495
  },
  "event_id": "$JgsmYPGa2LokD-CEfLOvie2PuMXp3cp4rShyAmp1UxM",
  "room_id": "!zfSEtmLSSvPqhEhQbd:matrix.org"
}

Element/Android

{
	"type": "m.room.message",
	"event_id": "$JgsmYPGa2LokD-CEfLOvie2PuMXp3cp4rShyAmp1UxM",
	"content": {
		"body": "Fotograf 3871: e-Wald",
		"filename": "WP2024-06_e-Wald_[Ranner]_IMG_3871.jpg",
		"format": "org.matrix.custom.html",
		"formatted_body": "<p><strong>Fotograf 3871: </strong>e-Wald</p>",
		"info": {
			"h": 427,
			"mimetype": "image/jpeg",
			"size": 264763,
			"w": 640
		},
		"msgtype": "m.image",
		"url": "mxc://matrix.org/EtSVRTpGdgvKiOtvFxKHIRBp"
	},
	"origin_server_ts": 1730325027658,
	"sender": "@e1035z:matrix.org",
	"room_id": "!zfSEtmLSSvPqhEhQbd:matrix.org",
	"unsigned": {
		"age": 2588
	}
}

A support of formatted captions for Element/Android client like Element/Windows and Element/Web would be highly appreciated.

Outcome

What did you expect?

Display of image with formatted caption

What happened instead?

Display of image without any caption

Your phone model

No response

Operating system version

No response

Application version and app store

1.6.20 [40106202] (G-fca16b67)

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

Yes

@RannerDesign RannerDesign added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

1 participant