From c441e08e92933273c51dba91a228de5143308837 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Sat, 23 Dec 2023 17:51:37 -0700 Subject: [PATCH] bridge: remove spurious Msgfs Signed-off-by: Sumner Evans --- .pre-commit-config.yaml | 2 +- bridge/commands/event.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26650604e..64a6eae63 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,6 @@ repos: - id: go-vet-repo-mod - repo: https://github.com/beeper/pre-commit-go - rev: v0.2.1 + rev: v0.2.2 hooks: - id: zerolog-ban-msgf diff --git a/bridge/commands/event.go b/bridge/commands/event.go index 24cf2eb9e..212fe5e64 100644 --- a/bridge/commands/event.go +++ b/bridge/commands/event.go @@ -69,7 +69,7 @@ func (ce *Event) ReplyAdvanced(msg string, allowMarkdown, allowHTML bool) { content.MsgType = event.MsgNotice _, err := ce.MainIntent().SendMessageEvent(context.Background(), ce.RoomID, event.EventMessage, content) if err != nil { - ce.ZLog.Error().Err(err).Msgf("Failed to reply to command") + ce.ZLog.Error().Err(err).Msg("Failed to reply to command") } } @@ -77,7 +77,7 @@ func (ce *Event) ReplyAdvanced(msg string, allowMarkdown, allowHTML bool) { func (ce *Event) React(key string) { _, err := ce.MainIntent().SendReaction(context.Background(), ce.RoomID, ce.EventID, key) if err != nil { - ce.ZLog.Error().Err(err).Msgf("Failed to react to command") + ce.ZLog.Error().Err(err).Msg("Failed to react to command") } } @@ -85,7 +85,7 @@ func (ce *Event) React(key string) { func (ce *Event) Redact(req ...mautrix.ReqRedact) { _, err := ce.MainIntent().RedactEvent(context.Background(), ce.RoomID, ce.EventID, req...) if err != nil { - ce.ZLog.Error().Err(err).Msgf("Failed to redact command") + ce.ZLog.Error().Err(err).Msg("Failed to redact command") } } @@ -93,6 +93,6 @@ func (ce *Event) Redact(req ...mautrix.ReqRedact) { func (ce *Event) MarkRead() { err := ce.MainIntent().SendReceipt(context.Background(), ce.RoomID, ce.EventID, event.ReceiptTypeRead, nil) if err != nil { - ce.ZLog.Error().Err(err).Msgf("Failed to mark command as read") + ce.ZLog.Error().Err(err).Msg("Failed to mark command as read") } }