diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 00000000..b1d3c8b4 --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,30 @@ +name: Spell Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + typos: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Check for typos + uses: crate-ci/typos@v1.43.4 + - name: Typos info + if: failure() + run: | + echo 'To check for a diff, run `mise x typos -- typos --diff`' + echo 'To fix typos, please run `mise x typos -- typos -w`' + echo 'You can find typos here: https://crates.io/crates/typos' + echo 'if you use VSCode, you can also install `Typos Spell Checker`' + echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' diff --git a/internal/channel/adapters/telegram/stream.go b/internal/channel/adapters/telegram/stream.go index 1f8b479c..0ef9976e 100644 --- a/internal/channel/adapters/telegram/stream.go +++ b/internal/channel/adapters/telegram/stream.go @@ -244,11 +244,11 @@ func (s *telegramOutboundStream) Push(ctx context.Context, event channel.StreamE } parseMode := resolveTelegramParseMode(msg.Format) for i, att := range msg.Attachments { - rto := replyTo + to := replyTo if i > 0 { - rto = 0 + to = 0 } - if err := sendTelegramAttachment(bot, s.target, att, "", rto, parseMode); err != nil && s.adapter.logger != nil { + if err := sendTelegramAttachment(bot, s.target, att, "", to, parseMode); err != nil && s.adapter.logger != nil { s.adapter.logger.Error("stream final attachment failed", slog.String("config_id", s.cfg.ID), slog.Any("error", err)) } }