refactor: update GMSL (#3058)
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364 Read this commit by commit to avoid going insane.
This commit is contained in:
parent
9fa39263c0
commit
72285b2659
306 changed files with 2117 additions and 1934 deletions
15
test/room.go
15
test/room.go
|
|
@ -22,6 +22,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal/eventutil"
|
||||
)
|
||||
|
|
@ -111,18 +112,18 @@ func (r *Room) insertCreateEvents(t *testing.T) {
|
|||
hisVis.HistoryVisibility = r.visibility
|
||||
}
|
||||
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomCreate, map[string]interface{}{
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomCreate, map[string]interface{}{
|
||||
"creator": r.creator.ID,
|
||||
"room_version": r.Version,
|
||||
}, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomMember, map[string]interface{}{
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomMember, map[string]interface{}{
|
||||
"membership": "join",
|
||||
}, WithStateKey(r.creator.ID))
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomPowerLevels, plContent, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomJoinRules, joinRule, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomHistoryVisibility, hisVis, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomPowerLevels, plContent, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomJoinRules, joinRule, WithStateKey(""))
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomHistoryVisibility, hisVis, WithStateKey(""))
|
||||
if r.guestCanJoin {
|
||||
r.CreateAndInsert(t, r.creator, gomatrixserverlib.MRoomGuestAccess, map[string]string{
|
||||
r.CreateAndInsert(t, r.creator, spec.MRoomGuestAccess, map[string]string{
|
||||
"guest_access": "can_join",
|
||||
}, WithStateKey(""))
|
||||
}
|
||||
|
|
@ -152,7 +153,7 @@ func (r *Room) CreateEvent(t *testing.T, creator *User, eventType string, conten
|
|||
mod.origin = creator.srvName
|
||||
}
|
||||
|
||||
var unsigned gomatrixserverlib.RawJSON
|
||||
var unsigned spec.RawJSON
|
||||
var err error
|
||||
if mod.unsigned != nil {
|
||||
unsigned, err = json.Marshal(mod.unsigned)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue