Skip to content

Image embeds don't work on Riot Android #48

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

Open
tfreedman opened this issue Feb 23, 2019 · 2 comments
Open

Image embeds don't work on Riot Android #48

tfreedman opened this issue Feb 23, 2019 · 2 comments

Comments

@tfreedman
Copy link

If a facebook user uploads an image, it'll show up in Riot Desktop. However, the Android app will just have a perpetual loading indicator, as the app fails to render the media. My guess is MIME types (e.g.:)

"info": {
      "mimetype": "image/whatever"
}

are being left off the media upload by the bridge, and Riot for Android is stricter about parsing things with an unspecified MIME type. It's possible my theory is totally wrong, though this should be fixed anyhow.

@thomas-profitt
Copy link
Member

In Riot, would you click the "(...)" button in the upper-right corner of one of the image messages, select "View Source", and post the "content" section of the message's source, redacting the URL (for your privacy), e.g.:

"content": {
    "url": "REDACTED",
    "info": {
      "mimetype": "image/png",
      "size": 26975
    },
    "body": "image.png",
    "msgtype": "m.image"
  },

@tfreedman
Copy link
Author

tfreedman commented Feb 24, 2019

Here's an example image that doesn't work in Riot Android:

{
  "origin_server_ts": 1550759327266,
  "sender": "@facebook_AAA:tylerfreedman.com",
  "event_id": "$BBB:tylerfreedman.com",
  "unsigned": {
    "age": 6858279
  },
  "content": {
    "url": "mxc://tylerfreedman.com/ZZZ",
    "info": {
      "h": 432,
      "w": 576,
      "size": 59511
    },
    "body": "image-YYY,
    "msgtype": "m.image"
  },
  "type": "m.room.message",
  "room_id": "!XXX:tylerfreedman.com"
}

Here's an example dump of an image that some software I wrote uploaded, which does work:

{
  "origin_server_ts": 1550954650824,
  "sender": "@server:tylerfreedman.com",
  "event_id": "$AAA:tylerfreedman.com",
  "unsigned": {
    "age": 21119808
  },
  "content": {
    "body": "BBB",
    "url": "mxc://tylerfreedman.com/CCC",
    "info": {
      "mimetype": "image/jpeg",
      "h": 799,
      "w": 1057,
      "size": 119403
    },
    "msgtype": "m.image"
  },
  "type": "m.room.message",
  "room_id": "!DDD:tylerfreedman.com"
}

Both work in Riot for Windows

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

No branches or pull requests

2 participants