diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-18 11:31:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-18 11:31:14 +0300 |
| commit | c0ffb385eaca5dbe53817ee3c288f8dcee6b414f (patch) | |
| tree | 8f95d1d2ec047ef6e09c39bc4d161daa7b5456a1 /internal/platforms/mastodon/mastodon.go | |
| parent | 9525b8c9a3f714235c8e591f3eddd4c05ed791da (diff) | |
using ctx also when posting messages
Diffstat (limited to 'internal/platforms/mastodon/mastodon.go')
| -rw-r--r-- | internal/platforms/mastodon/mastodon.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) } |
