fix false-positive error message

This commit is contained in:
Aine
2022-10-19 13:43:09 +03:00
parent 841f5dfcfa
commit a4ade439a6

View File

@@ -200,7 +200,9 @@ func (b *Bot) sendFiles(ctx context.Context, roomID id.RoomID, files []*utils.Fi
for _, file := range files {
req := file.Convert()
err := b.lp.SendFile(roomID, req, file.MsgType, utils.RelatesTo(!noThreads, parentID))
b.Error(ctx, roomID, "cannot upload file %s: %v", req.FileName, err)
if err != nil {
b.Error(ctx, roomID, "cannot upload file %s: %v", req.FileName, err)
}
}
}