mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 21:32:23 +03:00
Use PDU in more places (#3072)
This commit is contained in:
parent
d23d0369cc
commit
1432743d1a
16 changed files with 49 additions and 84 deletions
|
@ -29,7 +29,7 @@ func TestRuleSetEvaluatorMatchEvent(t *testing.T) {
|
|||
Name string
|
||||
RuleSet RuleSet
|
||||
Want *Rule
|
||||
Event *gomatrixserverlib.Event
|
||||
Event gomatrixserverlib.PDU
|
||||
}{
|
||||
{"empty", RuleSet{}, nil, ev},
|
||||
{"defaultCanWin", RuleSet{Override: []*Rule{defaultEnabled}}, defaultEnabled, ev},
|
||||
|
@ -188,7 +188,7 @@ func TestPatternMatches(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func mustEventFromJSON(t *testing.T, json string) *gomatrixserverlib.Event {
|
||||
func mustEventFromJSON(t *testing.T, json string) gomatrixserverlib.PDU {
|
||||
ev, err := gomatrixserverlib.MustGetRoomVersion(gomatrixserverlib.RoomVersionV7).NewEventFromTrustedJSON([]byte(json), false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue