summaryrefslogtreecommitdiff
path: root/internal/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/run.go')
-rw-r--r--internal/run.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/run.go b/internal/run.go
index 016d336..34874fc 100644
--- a/internal/run.go
+++ b/internal/run.go
@@ -22,6 +22,16 @@ func run(ctx context.Context, args config.Args) error {
now := time.Now().Unix()
printLogo()
+ // Check if posting is paused
+ paused, err := args.Config.IsPaused()
+ if err != nil {
+ return fmt.Errorf("error checking pause status: %w", err)
+ }
+ if paused {
+ colour.Infoln("Posting is paused until", args.Config.PauseEnd, "- skipping all posts")
+ return nil
+ }
+
if args.ComposeMode {
entryPath := fmt.Sprintf("%s/%d.ask.txt", args.GosDir, now)
if err := prompt.EditFile(entryPath); err != nil {