refactor to context, remove sentry spans

This commit is contained in:
Aine
2022-08-25 22:31:12 +03:00
parent 8419386a95
commit b0c274491f
16 changed files with 123 additions and 144 deletions

View File

@@ -3,11 +3,10 @@ package bot
import (
"context"
"strings"
"maunium.net/go/mautrix/event"
)
func (b *Bot) handle(ctx context.Context, evt *event.Event) {
func (b *Bot) handle(ctx context.Context) {
evt := eventFromContext(ctx)
content := evt.Content.AsMessage()
if content == nil {
b.Error(ctx, evt.RoomID, "cannot read message")