mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
PDU Sender split (#3100)
Initial cut of splitting PDU Sender into SenderID & looking up UserID where required.
This commit is contained in:
parent
725ff5567d
commit
7a1fd7f512
66 changed files with 580 additions and 189 deletions
|
@ -76,7 +76,9 @@ func CheckForSoftFail(
|
|||
}
|
||||
|
||||
// Check if the event is allowed.
|
||||
if err = gomatrixserverlib.Allowed(event.PDU, &authEvents); err != nil {
|
||||
if err = gomatrixserverlib.Allowed(event.PDU, &authEvents, func(roomID, senderID string) (*spec.UserID, error) {
|
||||
return db.GetUserIDForSender(ctx, roomID, senderID)
|
||||
}); err != nil {
|
||||
// return true, nil
|
||||
return true, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue