lint fixes

This commit is contained in:
Aine
2022-08-23 17:56:38 +03:00
parent b8cb8196c2
commit 24686ef501
2 changed files with 8 additions and 3 deletions

View File

@@ -4,14 +4,12 @@ stages:
lint:
stage: test
only: ['main']
image: registry.gitlab.com/etke.cc/base
script:
- make lint
unit:
stage: test
only: ['main']
image: registry.gitlab.com/etke.cc/base
script:
- make test

View File

@@ -61,10 +61,17 @@ func (b *Bot) Error(ctx context.Context, roomID id.RoomID, message string, args
// Notice sends a notice message to the matrix room
func (b *Bot) Notice(ctx context.Context, roomID id.RoomID, message string, args ...interface{}) {
b.lp.Send(roomID, &event.MessageEventContent{
_, err := b.lp.Send(roomID, &event.MessageEventContent{
MsgType: event.MsgNotice,
Body: fmt.Sprintf(message, args...),
})
if err != nil {
if sentry.HasHubOnContext(ctx) {
sentry.GetHubFromContext(ctx).CaptureException(err)
} else {
sentry.CaptureException(err)
}
}
}
// Start performs matrix /sync