mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 16:13:10 -06:00
Cleanup, fix test
This commit is contained in:
parent
7f41a6a3f0
commit
07960a5efc
|
|
@ -54,7 +54,13 @@ func TestCurrentRoomStateTable(t *testing.T) {
|
|||
events := room.CurrentState()
|
||||
err := sqlutil.WithTransaction(db, func(txn *sql.Tx) error {
|
||||
for i, ev := range events {
|
||||
err := tab.UpsertRoomState(ctx, txn, ev, nil, types.StreamPosition(i))
|
||||
ev.StateKeyResolved = ev.StateKey()
|
||||
userID, err := spec.NewUserID(string(ev.SenderID()), true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ev.UserID = *userID
|
||||
err = tab.UpsertRoomState(ctx, txn, ev, nil, types.StreamPosition(i))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to UpsertRoomState: %w", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -503,8 +503,6 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi.
|
|||
}
|
||||
}
|
||||
|
||||
logrus.Infof("%#v", syncReq.Response.Rooms.Join)
|
||||
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusOK,
|
||||
JSON: syncReq.Response,
|
||||
|
|
|
|||
Loading…
Reference in a new issue