diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-13 22:15:24 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-13 22:15:24 +0200 |
| commit | e0796a8f38c512ca1fb1f71aa455aebe1bf88f3a (patch) | |
| tree | fac048b1e7ab0a348cbe382387295678ba49400a /internal/platforms | |
| parent | 42e2b2c29e1e54995f5b20095943844ac92aa55e (diff) | |
fix editing entry before posting it
Diffstat (limited to 'internal/platforms')
| -rw-r--r-- | internal/platforms/linkedin/linkedin.go | 3 | ||||
| -rw-r--r-- | internal/platforms/mastodon/mastodon.go | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go index 39ca8cc..7db0e0d 100644 --- a/internal/platforms/linkedin/linkedin.go +++ b/internal/platforms/linkedin/linkedin.go @@ -58,7 +58,7 @@ func post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) } question := fmt.Sprintf("Do you want to post this message to Linkedin (%v)?", prev) - if err := prompt.FileAction(question, content, en.Path); err != nil { + if content, err = prompt.FileAction(question, content, en.Path); err != nil { return err } @@ -86,7 +86,6 @@ func postMessageToLinkedInAPI(ctx context.Context, personID, accessToken, conten } article := map[string]interface{}{} - if thumbnailPath, ok := prev.Thumbnail(); ok { thumbnailURN, err := postImageToLinkedInAPI(ctx, personURN, accessToken, thumbnailPath) if err != nil { diff --git a/internal/platforms/mastodon/mastodon.go b/internal/platforms/mastodon/mastodon.go index c0264de..186623a 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, en entry.Entry) colour.Infoln("Not posting", en, "to Mastodon as dry-run enabled") return nil } - if err := prompt.FileAction("Do you want to post this message to Mastodon?", content, en.Path); err != nil { + if content, err = prompt.FileAction("Do you want to post this message to Mastodon?", content, en.Path); err != nil { return err } |
