-
Notifications
You must be signed in to change notification settings - Fork 752
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
m.image height and widget are float, not int #363
Comments
Hello @anoadragon453 , Are you sure the image was sent from RiotX? I've checked in the model, and we only use Benoit |
Hm, it was sent from Riot X but it could be something on the bridge side? Odd though, since the bridge is written in Golang which is typed as well. I'll try the mautrix-whatsapp side again. |
RiotX definitely sends all integers as floats, you can check the event json in the synapse db. Maybe the problem is the JSON serializer? The Moshi repo had a bunch of int/float mixup issues, although none of them seemed to be about serialization with JsonClass. |
I've just checked the json sent to the server, and all integers are well sent as integers.
And the data from the sync is identical. |
@anoadragon453 any information about the device where riotx was installed? Model, os version, etc. A user agent would be ideal. |
My Huawei P20 Pro (Android 9.0) at least does it reliably for every image. Just sent one to #riotx:matrix.org. "View Source" on Riot Web and RiotX converted them back to ints before showing, but old Riot Android view source and the server db definitely show floats |
Pixel XL, Android 9.0 |
I think there is something strange in RiotX. The view source shows: When sending an image from RiotX:
When sending an image from Riot Android:
|
Hi @anoadragon453 can we close this issue? |
The issue still seems to be there on build 936 |
This issue happened now too. See the above ruma issue. It seems like if you fetch the data via the |
No, it's riot web showing you different content than what the event actually contains (as I said above: #363 (comment)) |
@tulir whoops ok. Yeah but this still happens anyway |
Note that this means |
Json actually doesn't really know between double or integer, it's just "numbers" |
Huawei P Smart Z, Android 10.0 |
Should be fixed by #1766 |
Sending images to v6 rooms still doesn't work on latest develop (G-b3379) |
still the same |
The spec mentions an
m.image
s content.info.{h,w} must be integers, however when sending a message today my bridge broke complaining that they were floats: mautrix/whatsapp#80They should be converted to floats to remain spec compliant.
The text was updated successfully, but these errors were encountered: