aboutsummaryrefslogtreecommitdiff
path: root/matrix/pushrules/rule.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-05-02 23:05:37 +0300
committerTulir Asokan <tulir@maunium.net>2018-05-02 23:05:37 +0300
commitc5ea283777ddeb8eecab159acb9cf5de407a7f71 (patch)
treecd88838f8a1517c0ca5e71d801ecf4f4517a4871 /matrix/pushrules/rule.go
parentaec3b8d204dd8b4f9308f536e9b5eefcf966f86e (diff)
Add PushRuleCollection tests
Diffstat (limited to 'matrix/pushrules/rule.go')
-rw-r--r--matrix/pushrules/rule.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/matrix/pushrules/rule.go b/matrix/pushrules/rule.go
index 5c32a05..ec51d24 100644
--- a/matrix/pushrules/rule.go
+++ b/matrix/pushrules/rule.go
@@ -27,7 +27,7 @@ type PushRuleCollection interface {
type PushRuleArray []*PushRule
-func (rules PushRuleArray) setType(typ PushRuleType) PushRuleArray {
+func (rules PushRuleArray) SetType(typ PushRuleType) PushRuleArray {
for _, rule := range rules {
rule.Type = typ
}
@@ -49,7 +49,7 @@ type PushRuleMap struct {
Type PushRuleType
}
-func (rules PushRuleArray) setTypeAndMap(typ PushRuleType) PushRuleMap {
+func (rules PushRuleArray) SetTypeAndMap(typ PushRuleType) PushRuleMap {
data := PushRuleMap{
Map: make(map[string]*PushRule),
Type: typ,
@@ -76,7 +76,7 @@ func (ruleMap PushRuleMap) GetActions(room Room, event *gomatrix.Event) PushActi
return nil
}
-func (ruleMap PushRuleMap) unmap() PushRuleArray {
+func (ruleMap PushRuleMap) Unmap() PushRuleArray {
array := make(PushRuleArray, len(ruleMap.Map))
index := 0
for _, rule := range ruleMap.Map {