summaryrefslogtreecommitdiff
path: root/internal/platforms/linkedin
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-18 22:03:01 +0300
committerPaul Buetow <paul@buetow.org>2024-10-18 22:03:01 +0300
commitd20ce579021f3dc087cbcb19a2e0cb2f9a4db113 (patch)
treeb3f29756524637b8d5ba6fa9c1ebe8ecefa30c8a /internal/platforms/linkedin
parentee2cb360bfb6ab35cb8a373fd1237993cea168d0 (diff)
can edit a post before posting int
Diffstat (limited to 'internal/platforms/linkedin')
-rw-r--r--internal/platforms/linkedin/linkedin.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go
index d8eb91e..b07ab70 100644
--- a/internal/platforms/linkedin/linkedin.go
+++ b/internal/platforms/linkedin/linkedin.go
@@ -42,13 +42,8 @@ func post(ctx context.Context, args config.Args, sizeLimit int, ent entry.Entry)
return err
}
if err := prompt.DoYouWantThis("Do you want to post this message to Linkedin?", content); err != nil {
- // TODO: Do the same for Mastodon. Gan this be more generalized?
- if err == prompt.ErrEditContent {
- if err := prompt.EditFile(ent.Path); err != nil {
- return err
- }
- ent, err = entry.New(ent.Path)
- if err != err {
+ if errors.Is(err, prompt.ErrEditContent) {
+ if err := ent.Edit(); err != nil {
return err
}
return post(ctx, args, sizeLimit, ent)