From aa337e4eede9668b6ecd0549e6f812f61011f406 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sun, 29 Oct 2023 20:04:58 -0700 Subject: [PATCH] Fix community ban causing panic --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 97f18f5..b3c82cf 100644 --- a/main.go +++ b/main.go @@ -289,6 +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 } // Set the reply ID for the post/comment in the database @@ -299,6 +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 } log.Info("Edited comment"). @@ -313,6 +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 } // Set the reply ID for the post/comment in the database @@ -323,6 +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 } log.Info("Created new comment").