This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Copy rather than move the fields to shuffle between a v1 and a v2 event.#402
Merged
NegativeMjark merged 2 commits intodevelopfrom Dec 1, 2015
Merged
Copy rather than move the fields to shuffle between a v1 and a v2 event.#402NegativeMjark merged 2 commits intodevelopfrom
NegativeMjark merged 2 commits intodevelopfrom
Conversation
This should make all v1 APIs compatible with v2 clients. While still allowing v1 clients to access the fields. This makes the documentation easier since we can just document the v2 format and explain that some of the fields, in some of the APIs are duplicated for backwards compatibility, rather than having to document two separate event formats.
synapse/events/utils.py
Outdated
Contributor
There was a problem hiding this comment.
Should this only set if it's present? I don't like the number of random nulls we already add to responses...
Contributor
Author
There was a problem hiding this comment.
I dunno. I don't think this changes the behaviour of the code from before. I don't think we should be seeing events without a sender either. I'm happy to switch this to a conditional if you prefer.
Contributor
|
LGTM modulo one question |
NegativeMjark
added a commit
that referenced
this pull request
Dec 1, 2015
Copy rather than move the fields to shuffle between a v1 and a v2 event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should make all v1 APIs compatible with v2 clients. While still
allowing v1 clients to access the fields.
This makes the documentation easier since we can just document the v2
format and explain that some of the fields, in some of the APIs are
duplicated for backwards compatibility, rather than having to document
two separate event formats.