aboutsummaryrefslogtreecommitdiff
path: root/userapi/storage/interface.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-09-09 13:56:33 +0200
committerGitHub <noreply@github.com>2022-09-09 13:56:33 +0200
commit64472d9aab85bf56fb345570459c372b78a14b8c (patch)
tree16ea52999b31aed90ed883a47031c0cff6141d3f /userapi/storage/interface.go
parent42a82091a8932fd92e36ba41c644c2058ab7dce6 (diff)
Update getting pushrules, add tests, tweak pushrules (#2705)
This PR - adds tests for `evaluatePushrules` - removes the need for the UserAPI on the `OutputStreamEventConsumer` (for easier testing) - adds a method to get the pushrules from the database - adds a new default pushrule for `m.reaction` events (and some other tweaks)
Diffstat (limited to 'userapi/storage/interface.go')
-rw-r--r--userapi/storage/interface.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/userapi/storage/interface.go b/userapi/storage/interface.go
index f7cd1810..fbac463e 100644
--- a/userapi/storage/interface.go
+++ b/userapi/storage/interface.go
@@ -20,6 +20,7 @@ import (
"errors"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
+ "github.com/matrix-org/dendrite/internal/pushrules"
"github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/dendrite/userapi/storage/tables"
"github.com/matrix-org/dendrite/userapi/types"
@@ -53,6 +54,7 @@ type AccountData interface {
// If no account data could be found, returns nil
// Returns an error if there was an issue with the retrieval
GetAccountDataByType(ctx context.Context, localpart, roomID, dataType string) (data json.RawMessage, err error)
+ QueryPushRules(ctx context.Context, localpart string) (*pushrules.AccountRuleSets, error)
}
type Device interface {