aboutsummaryrefslogtreecommitdiff
path: root/matrix/matrix.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-04-27 15:02:21 +0300
committerTulir Asokan <tulir@maunium.net>2019-04-27 15:02:21 +0300
commitbc7e2d9a1c871e3fbce932f9695fc24083bc2cc4 (patch)
tree89f104f59ee6aa33ea41140c8472ff5ba95f97a9 /matrix/matrix.go
parent60e3fe392711ef233aa68a062a7ee96d145d2cb4 (diff)
Add locks and other sync stuff
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r--matrix/matrix.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index ef0e349..b87042e 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -178,8 +178,10 @@ func (c *Container) UpdatePushRules() {
resp, err := pushrules.GetPushRules(c.client)
if err != nil {
debug.Print("Failed to fetch push rules:", err)
+ c.config.PushRules = &pushrules.PushRuleset{}
+ } else {
+ c.config.PushRules = resp
}
- c.config.PushRules = resp
c.config.SavePushRules()
}