summaryrefslogtreecommitdiff
path: root/internal/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'internal/platforms')
-rw-r--r--internal/platforms/linkedin/linkedin.go3
-rw-r--r--internal/platforms/mastodon/mastodon.go2
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
}