-
Notifications
You must be signed in to change notification settings - Fork 383
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
Clarify that prev_content is part of unsigned, always #2648
Conversation
I can't see CircleCI's logs without creating an account there?! |
Enjoy! 😄 |
Ah, I think I know what that's about. I was assuming just adding unsigned:
properties:
# ... when a referenced object in |
I guess I'll just have to figure out virtualenv or install everything I need for the scripts with my system package manager... |
After installing all the Python deps, it fails, but in a way unrelated to my PR / branch 😕 |
Ah, was running the first thing I saw in the CircleCI config when I should have looked further down where the actual jobs are defined. |
and for the hat trick: signoff: #2647 (comment) |
I was of the impression I wouldn't have to do it anymore, at least not in every PR or sth., since I saw it in none of the other PRs. Added to the PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I think this is a backwards-incompatible change to the spec, which requires an MSC. Synapse deliberately adds a prev_content
field for compatibility with the spec.
@richvdh this is documenting what synapse does though? |
I was under the impression that this PR was removing the |
it sounds like a synapse bug if it's in both places, particularly if it's only sometimes. I can't find any links (possibly because they link to internal conversations somewhere), but I recall having this discussion a while ago and it was revealed that having it at the top level was a event v1 format thing, not the r0 format we currently try to use. Just feels a bit silly to require an MSC for something that Synapse has done all along more consistently, particularly when this part of the spec uses Synapse as the reference. |
In the #matrix-spec discussion, somebody mentioned the format where synapse copies it from unsigned to the event object root is used for appservices, but only because Synapse doesn't yet implement the latest appservice spec. The copying is done here, and that is the only place synapse ever puts |
This sounds like crossed wires. Afaik the appservice spec just follows the C-S spec here.
yes, it's used in a lot of places. Most of the C-S api that returns events, in fact. |
The appservice spec follows the client-server spec, but Synapse doesn't follow the appservice spec because pre-r0 the appservice spec was using v1 event formats and Synapse never changed. |
If removing |
I'm failing to follow this. https://matrix.org/docs/spec/client_server/r0.6.1 is pretty clear that
would that not mean mandating that servers put entries in both the event body and in unsigned? (as indeed synapse does, I believe, but I'm still not sure it's a sensible thing to require .)
I'm clearly failing to grok where Synapse isn't following the spec, so please can you spell it out like I'm 5? |
I don't actually know, funnily enough. I just know that some people have experienced issues with Ruma not detecting |
you might be thinking specifically of the Of course, the fact that synapse returns |
fwiw, this is from the js-sdk: The comment there implies that the spec was just never updated for the v2 format. |
the only api which ever made it to "v2" was /sync (which is why it has a different format to everything else), and even that only made it as far as "v2_alpha" ( So no, the spec was never updated for the v2 format, but that's correct, because none of the endpoints changed behaviour in practice. |
Yes, the problem was specific to So to summarize the current situation (and check whether I understood it right):
@richvdh, is your suggestion above that the spec should be changed to say that I've asked previously what the reasoning was for moving |
your understanding seems right to me.
I haven't done a complete audit; I think what you said is correct.
yes.
yes, that is the intention; however, that would be a backwards-incompatible change to the spec, which is fiddly to do and we always seem to end up with a million more pressing concerns. |
Alright, then there's a clear way forward now at least :) I'll close this PR, but will comment here again in case I start working on the suggested solution. |
Fixes #877.
Signed-off-by: Jonas Platte [email protected]