-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Some fields are missing in events of /sync response #4359
Comments
This is surprising. Both of these fields should be present. Can you provide clearer repro steps and/or a dump of the json you believe to be faulty? |
Note that https://github.com/matrix-org/sytest/blob/develop/tests/31sync/04timeline.pl#L39 tests that |
It specifically affects the "invite": {
"!JnIqzGggEpbkjEPJvc:safaradeg.net":{
"invite_state":{
"events":[
{
"content":{
"join_rule":"invite"
},
"sender":"@levans:safaradeg.net",
"state_key":"",
"type":"m.room.join_rules"
},
{
"content":{
"name":"TEST"
},
"sender":"@levans:safaradeg.net",
"state_key":"",
"type":"m.room.name"
},
{
"content":{
"avatar_url":"mxc://safaradeg.net/TfUUoDkOWpbbIwuIpShznpNp",
"displayname":"Levans",
"membership":"join"
},
"sender":"@levans:safaradeg.net",
"state_key":"@levans:safaradeg.net",
"type":"m.room.member"
},
{
"content":{
"avatar_url":null,
"displayname":null,
"membership":"invite"
},
"event_id":"$1546954279258alCXG:safaradeg.net",
"membership":"invite",
"origin_server_ts":1546954279291,
"sender":"@levans:safaradeg.net",
"state_key":"@tabsbot:safaradeg.net",
"type":"m.room.member",
"unsigned":{
"age":17030,
"prev_content":{
"membership":"leave"
},
"prev_sender":"@levans:safaradeg.net",
"replaces_state":"$1546954273257NfLye:safaradeg.net"
}
}
]
}
}
} |
https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-sync says:
|
Oh. That explains it. But in that case, according to the spec, |
the spec does say "may only have", rather than "will only have", but yes I'm inclined to agree this is inconsistent and a bug which should be fixed. |
could you open a new bug which describes the problem succinctly? |
Will do |
Description
Some state events sent in an initial /sync response from synapse are missing the
origin_server_ts
andevent_id
, while the spec lists them as required.Steps to reproduce
Attempting to parse the sync response using ruma-client fails because these fields are missing, see https://github.com/ruma/ruma-events/pull/20
Version information
If not matrix.org:
Version: synapse version 0.34.0
Install method: pip
Platform: Gentoo/Linux in a python3 virtualenv
The text was updated successfully, but these errors were encountered: