Skip to content

Commit

Permalink
bridge: remove spurious Msgfs
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 24, 2023
1 parent cd593a5 commit 517d172
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bridge/commands/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,30 @@ 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")
}
}

// React sends a reaction to the command.
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")
}
}

// Redact redacts the command.
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")
}
}

// MarkRead marks the command event as read.
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")
}
}

0 comments on commit 517d172

Please sign in to comment.