From 2059932ad925b37a37d3f3cd416e792ddc8d52c1 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 21 Aug 2022 16:43:52 -0400 Subject: [PATCH] bit more logging, reset on timer reset --- main.go | 1 - nun.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 43c004a..9a90c66 100644 --- a/main.go +++ b/main.go @@ -51,7 +51,6 @@ func main() { } var nun *nunWatch uid := id.NewUserID(strings.ToLower(conf.Username), strings.ToLower(conf.Domain)) - log.Println(uid) store.SaveFilterID(uid, fID.FilterID) matrixClient.Store = store syncer := matrixClient.Syncer.(*mautrix.DefaultSyncer) diff --git a/nun.go b/nun.go index 80e0b19..1df7c4f 100644 --- a/nun.go +++ b/nun.go @@ -22,6 +22,7 @@ func newNunWatch(stop chan bool, c *mautrix.Client, t int) *nunWatch { func (n *nunWatch) SetTimer(t int) { n.timer = t + n.fail = 0 } func (n *nunWatch) Main() { @@ -53,6 +54,7 @@ func (n *nunWatch) Main() { ticker.Reset(60 * time.Second) } if curT != n.timer { + log.Println("updating nunwatch timer") ticker.Reset(time.Duration(n.timer) * time.Minute) curT = n.timer }