mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Remove origin
field from PDUs (#2737)
This nukes the `origin` field from PDUs as per matrix-org/matrix-spec#998, matrix-org/gomatrixserverlib#341.
This commit is contained in:
parent
3e87096a21
commit
f022fc1397
11 changed files with 69 additions and 49 deletions
|
@ -148,8 +148,15 @@ func processInvite(
|
|||
JSON: jsonerror.BadJSON("The event JSON could not be redacted"),
|
||||
}
|
||||
}
|
||||
_, serverName, err := gomatrixserverlib.SplitID('@', event.Sender())
|
||||
if err != nil {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.BadJSON("The event JSON contains an invalid sender"),
|
||||
}
|
||||
}
|
||||
verifyRequests := []gomatrixserverlib.VerifyJSONRequest{{
|
||||
ServerName: event.Origin(),
|
||||
ServerName: serverName,
|
||||
Message: redacted,
|
||||
AtTS: event.OriginServerTS(),
|
||||
StrictValidityChecking: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue