Use PDU in even more places (#3074)

- No longer rely on *Event returning from NewEventFrom... functions
 
Requires https://github.com/matrix-org/gomatrixserverlib/pull/377
This commit is contained in:
kegsay 2023-05-03 10:21:27 +01:00 committed by GitHub
parent 9b98e5a102
commit 6284790f98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 28 additions and 44 deletions

View file

@ -453,7 +453,7 @@ func createRoom(
if i > 0 {
builder.PrevEvents = []gomatrixserverlib.EventReference{builtEvents[i-1].EventReference()}
}
var ev *gomatrixserverlib.Event
var ev gomatrixserverlib.PDU
ev, err = builder.AddAuthEventsAndBuild(userDomain, &authEvents, evTime, roomVersion, cfg.Matrix.KeyID, cfg.Matrix.PrivateKey)
if err != nil {
util.GetLogger(ctx).WithError(err).Error("buildEvent failed")