From 976c6c130ccf064a0da5a8a813a7356f9adc77d9 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Fri, 17 Nov 2023 16:16:38 +0000 Subject: [PATCH] Fix issue where bot eventually stops replying once it encounters an error --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index b3c82cf..3ef8488 100644 --- a/main.go +++ b/main.go @@ -289,7 +289,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries, }) if err != nil { log.Warn("Error while trying to edit comment").Err(err).Send() - return + continue } // Set the reply ID for the post/comment in the database @@ -300,7 +300,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries, }) if err != nil { log.Warn("Error setting the reply ID of the new comment").Err(err).Send() - return + continue } log.Info("Edited comment"). @@ -315,7 +315,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries, }) if err != nil { log.Warn("Error while trying to create new comment").Err(err).Send() - return + continue } // Set the reply ID for the post/comment in the database @@ -326,7 +326,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries, }) if err != nil { log.Warn("Error setting the reply ID of the new comment").Err(err).Send() - return + continue } log.Info("Created new comment").