From c0ffb385eaca5dbe53817ee3c288f8dcee6b414f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 18 Oct 2024 11:31:14 +0300 Subject: using ctx also when posting messages --- internal/platforms/mastodon/mastodon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/platforms/mastodon/mastodon.go') diff --git a/internal/platforms/mastodon/mastodon.go b/internal/platforms/mastodon/mastodon.go index ce9a765..c5d5c35 100644 --- a/internal/platforms/mastodon/mastodon.go +++ b/internal/platforms/mastodon/mastodon.go @@ -31,7 +31,7 @@ func Post(ctx context.Context, args config.Args, sizeLimit int, ent entry.Entry) return prompt.ErrAborted } - req, err := http.NewRequest("POST", args.Secrets.MastodonURL, bytes.NewBuffer(payloadBytes)) + req, err := http.NewRequestWithContext(ctx, "POST", args.Secrets.MastodonURL, bytes.NewBuffer(payloadBytes)) if err != nil { return fmt.Errorf("failed to create request: %w", err) } -- cgit v1.2.3