Use sender instead of user_id for any stripped state event usages#1425
Use sender instead of user_id for any stripped state event usages#1425MadLittleMods wants to merge 1 commit into
sender instead of user_id for any stripped state event usages#1425Conversation
|
|
||
| my %members = map { | ||
| $_->{state_key} => $_ | ||
| $_->{sender} => $_ |
There was a problem hiding this comment.
The PR description talks about updating user_id -> sender but the diff shows state_key -> sender?
There was a problem hiding this comment.
ugh, totally!
This is my mistake. My original attempt did do user_id -> sender changes (#1424) but I also made too many changes and caused other errors (all manual changes). I then started over and had an LLM do a cycle of (change -> test) to find the minimum changes and it ended up here. I didn't notice it wasn't a user_id -> sender change and kept the same reasoning. Sorry for the slopped on experience.
All of that is a red herring though and it's just my naive-perl eyes spotting user_id when all of that is actually fine and the actual problem is we're dropping the inviter's membership as the error actually says. Most likely caused by this review point.
This is all unspecced behavior but is something Synapse has been doing forever and tested here so probably have to keep it going.
There was a problem hiding this comment.
Closing as no change to Sytest is probably necessary ⏩
Use
senderinstead ofuser_idfor any stripped state event usagesSpawning from element-hq/synapse#19723 (where these tests started to fail) which ensures we actually use stripped state everywhere. Stripped state only has
content,sender,state_key,typeavailable. Previously, this relied on the full PDU being available which meant access touser_idas well.user_idis a deprecated field from Synapse that isn't in the spec.Dev notes
Example failure:
Testing:
Generic (from docs):