matrix-org / matrix-org/matrix-bifrost

Image bridging issues

Open
#216 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Defect
Dominant language
TypeScript
Stars
187
Forks
38
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
On XMPP side, Matrix sent images are unknown type, which makes Conversations not know how to open this file. In gajim it works as it should (?!).
Isn't there a way to specify mime-type of sent file in xmpp message?
```xml


https://matrix.org/_matrix/media/v1/download/juniorjpdj.pl/IkWOVbXiNPIEPSJVINIKHlDT


https://matrix.org/_matrix/media/v1/download/juniorjpdj.pl/IkWOVbXiNPIEPSJVINIKHlDT

```
Opening with gallery doesn't work.
![image](https://user-images.githubusercontent.com/7334549/100313401-dfc85900-2fb4-11eb-877d-cd4d9cc6d21b.png)

On Matrix side, XMPP files are considered invalid (?!) while URL opens just as it should.
![Screenshot_20201126_065200](https://user-images.githubusercontent.com/7334549/100312973-eb675000-2fb3-11eb-849b-035cbc98d567.png)
File sent from XMPP to Matrix on matrix side:
```json
{
"content": {
"body": "https://xmpp.juniorjpdj.pl/upload/470338f9c7ab6fb171d53d8ce9f4b7d5a1674942/5AX97WVLKbAQtFlodeStXV3fKuCLsLtjQ3hORZOf/IMG_20201124_203951_774.jpg",
"filename": "IMG_20201124_203951_774.jpg",
"info": {
"mimetype": "image/jpeg",
"size": 398108
},
"msgtype": "m.image",
"remote_id": "c3923736-cb0a-46c4-bae8-f1516ab91bb7",
"url": "{\"content_uri\":\"mxc://matrix.org/jtLdxoxVKBtZzmpQBhUjCmCo\"}"
},
"origin_server_ts": 1606369408166,
"sender": "@_xmpp_juniorjpdj=40juniorjpdj.pl:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 529
},
"event_id": "$nkKObwSw8FvJ6XZmcgaDyGHopaLM_3SyMIkbyB28WLQ",
"room_id": "!JmSAwoGrkTyHXYHJYJ:juniorjpdj.pl"
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by tracing the XMPP media-message and Matrix m.image handling using the XML and event payloads in this report, then reproduce both directions. Done means image MIME metadata is preserved and each side recognizes and opens the transferred media.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.