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

Unsupported event error when giphy image is posted to room #1828

Closed
ajkessel opened this issue Sep 28, 2023 · 6 comments
Closed

Unsupported event error when giphy image is posted to room #1828

ajkessel opened this issue Sep 28, 2023 · 6 comments
Labels

Comments

@ajkessel
Copy link

Steps to reproduce

Using the giphy maubot plugin, when it uploads an animated GIF to the room, Element-X reports:

Unsupported event: m.room.message
invalid type: string "288",
expected u64 at line 1 column 36

Works fine on Element.

Example decrypted event source:

{
  "room_id": "(redacted)",
  "type": "m.room.message",
  "content": {
    "msgtype": "m.image",
    "body": "file.gif",
    "url": "mxc://(path here)",
    "info": {
      "mimetype": "image/gif",
      "h": "288",
      "w": "480"
    }
  }
}

Outcome

What did you expect?

Image to be visible

What happened instead?

Error code

Your phone model

iPhone 13 Pro

Operating system version

iOS 17.0.2

Application version

1.3.1 (74)

Homeserver

Synapse

Will you send logs?

No

@pixlwave
Copy link
Contributor

pixlwave commented Sep 28, 2023

The bot is creating a non-compliant event. The spec defines the w and h should be integers and not strings.

@jplatte I assume we stick to the spec here?

@ajkessel
Copy link
Author

I've added this as an issue to the bot at TomCasavant/GiphyMaubot#11

@jplatte
Copy link
Contributor

jplatte commented Sep 28, 2023

Yeah, Ruma doesn't seem to have any workarounds for stringified integers in this particular place 😄

@ajkessel
Copy link
Author

ajkessel commented Sep 29, 2023

The GiphyMaubot plugin has been fixed so this error no longer occurs, but I wonder if Element-X could/should be move forgiving about slight non-compliance like this. Fine with me if you want to close, though.

@jplatte
Copy link
Contributor

jplatte commented Sep 29, 2023

I like that we're helping other software find these bugs, so I'd be inclined to keep things as-is.

@stefanceriu
Copy link
Contributor

so I'd be inclined to keep things as-is.

I agree, we're intentionally being very strict on what we're accepting and sending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants