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

Thumbnail method isn't required and has no default #656

Open
Sorunome opened this issue Jun 25, 2020 · 8 comments
Open

Thumbnail method isn't required and has no default #656

Sorunome opened this issue Jun 25, 2020 · 8 comments
Labels
A-Client-Server Issues affecting the CS API wart A point where the protocol is inconsistent or inelegant

Comments

@Sorunome
Copy link
Contributor

Either it has to be required or a default has to be specified

@richvdh
Copy link
Member

richvdh commented Jun 29, 2020

please could you clarify the context here?

@Sorunome
Copy link
Contributor Author

In the specification for media thumbnails it says that the field method is an enum, one of crop or scale. It, however, does not specify that that field is required. And it also doesn't specify a default. So, what should happen if it is not set? Use crop? Use scale? Display a fluffy fox?

As reference, synapse seems to default to scale.

@richvdh
Copy link
Member

richvdh commented Jun 30, 2020

Either it has to be required or a default has to be specified

or a third option: it's up to the server.

@Sorunome
Copy link
Contributor Author

or a third option: it's up to the server.

That is undefined behaviour, causing different servers to behave differently, causing very unexpected results. That is a bad option :/

@richvdh
Copy link
Member

richvdh commented Jun 30, 2020

if, as a client, you care which you get, why not just specify?

@richvdh
Copy link
Member

richvdh commented Jun 30, 2020

I mean: I don't disagree that it would probably be nice to make it mandatory; I'm just failing to see that it is a major problem.

@Sorunome
Copy link
Contributor Author

if, as a client, you care which you get, why not just specify?

Currently riot-web doesn't specify for <img> tags

I mean: I don't disagree that it would probably be nice to make it mandatory; I'm just failing to see that it is a major problem.

Undefined behaviour always sounds like a problem. Some person will depend on synapse using scale, and then everything breaks if they use another server

@richvdh
Copy link
Member

richvdh commented Jun 30, 2020

Some person will depend on synapse using scale, and then everything breaks if they use another server

fair point.

@turt2live turt2live added A-Client-Server Issues affecting the CS API wart A point where the protocol is inconsistent or inelegant labels Jun 30, 2020
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API wart A point where the protocol is inconsistent or inelegant
Projects
None yet
Development

No branches or pull requests

3 participants