Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Omit displayname or avatar_url if they aren't set instead of returning null #7497

Merged
merged 3 commits into from
May 19, 2020

Conversation

aaronraimist
Copy link
Contributor

@aaronraimist aaronraimist commented May 14, 2020

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
  • Pull request includes a sign off
  • Code style is correct (run the linters)

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

…g null

Signed-off-by: Aaron Raimist <aaron@raim.ist>
Signed-off-by: Aaron Raimist <aaron@raim.ist>
@clokep clokep requested a review from a team May 14, 2020 13:39
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm other than a tweak to the changelog, thanks!

It'd be nice to include tests for this in sytest, though I won't force anyone to battle with Perl if they don't want to...

changelog.d/7497.bugfix Outdated Show resolved Hide resolved
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@aaronraimist
Copy link
Contributor Author

I'm happy to attempt to write a Sytest but I'm currently unable to get Sytest to work. For now I have filed matrix-org/sytest#872 and will work on that once I figure out how to make CPAN work.

@richvdh richvdh self-requested a review May 19, 2020 09:29
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@richvdh richvdh merged commit 250f3eb into matrix-org:develop May 19, 2020
@richvdh
Copy link
Member

richvdh commented May 19, 2020

You may already have tried this, but do drop into #synapse-dev to get a hand wrangling cpan.

@aaronraimist aaronraimist deleted the m.room.member-omit branch May 25, 2020 04:41
phil-flex pushed a commit to phil-flex/synapse that referenced this pull request 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avatar_url is null rather than "" in invite
2 participants