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

Inconsistency in which profile fields are returned and what values they get #332

Open
turt2live opened this issue Jul 19, 2018 · 1 comment
Labels
A-S2S Server-to-Server API (federation) wart A point where the protocol is inconsistent or inelegant

Comments

@turt2live
Copy link
Member

Querying for the display name of someone who does not have a display name gets you {displayname: null}, however if you query for a field that does not exist you get {}. Likewise, the full profile for a user that has nothing set is {displayname: null, avatar_url: null}.

Should decide on whether null is used, or just omitting the properties.

@turt2live turt2live added wart A point where the protocol is inconsistent or inelegant A-S2S Server-to-Server API (federation) labels Jul 19, 2018
turt2live referenced this issue in turt2live/matrix-doc Jul 20, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
turt2live referenced this issue in turt2live/matrix-doc Jul 24, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
turt2live referenced this issue in turt2live/matrix-doc Jul 26, 2018
This removes the Directory and Profile sections, instead opting to document them as Queries. 

The behaviour of profile queries is based on Synapse's behaviour. A few issues have been opened to improve the behaviour:
* matrix-org#1434
* matrix-org#1435
* https://github.com/matrix-org/matrix-doc/issues/1436
* https://github.com/matrix-org/matrix-doc/issues/1437

This fixes matrix-org#1404
@richvdh
Copy link
Member

richvdh commented Aug 2, 2018

As a rule of thumb, we've gone for not including properties rather than having them set to null.

richvdh referenced this issue in matrix-org/synapse May 19, 2020
…g null (#7497)

Per https://github.com/matrix-org/matrix-doc/issues/1436#issuecomment-410089470 they should be omitted instead of returning null or "". They aren't marked as required in the spec.

Fixes #7333

Signed-off-by: Aaron Raimist <aaron@raim.ist>
phil-flex referenced this issue in phil-flex/synapse Jun 16, 2020
…g null (matrix-org#7497)

Per https://github.com/matrix-org/matrix-doc/issues/1436#issuecomment-410089470 they should be omitted instead of returning null or "". They aren't marked as required in the spec.

Fixes matrix-org#7333

Signed-off-by: Aaron Raimist <aaron@raim.ist>
@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-S2S Server-to-Server API (federation) wart A point where the protocol is inconsistent or inelegant
Projects
None yet
Development

No branches or pull requests

2 participants