always reply to a specific message; moved matrix-related utils to the linkpearl; refactoring
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/raja/argon2pw"
|
||||
"gitlab.com/etke.cc/go/mxidwc"
|
||||
"maunium.net/go/mautrix/id"
|
||||
@@ -43,7 +42,7 @@ func (b *Bot) allowOwner(actorID id.UserID, targetRoomID id.RoomID) bool {
|
||||
}
|
||||
cfg, err := b.cfg.GetRoom(targetRoomID)
|
||||
if err != nil {
|
||||
b.Error(sentry.SetHubOnContext(context.Background(), sentry.CurrentHub()), targetRoomID, "failed to retrieve settings: %v", err)
|
||||
b.Error(context.Background(), "failed to retrieve settings: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -66,7 +65,7 @@ func (b *Bot) allowSend(actorID id.UserID, targetRoomID id.RoomID) bool {
|
||||
|
||||
cfg, err := b.cfg.GetRoom(targetRoomID)
|
||||
if err != nil {
|
||||
b.Error(sentry.SetHubOnContext(context.Background(), sentry.CurrentHub()), targetRoomID, "failed to retrieve settings: %v", err)
|
||||
b.Error(context.Background(), "failed to retrieve settings: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -80,7 +79,7 @@ func (b *Bot) allowReply(actorID id.UserID, targetRoomID id.RoomID) bool {
|
||||
|
||||
cfg, err := b.cfg.GetRoom(targetRoomID)
|
||||
if err != nil {
|
||||
b.Error(sentry.SetHubOnContext(context.Background(), sentry.CurrentHub()), targetRoomID, "failed to retrieve settings: %v", err)
|
||||
b.Error(context.Background(), "failed to retrieve settings: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user