From a9cddb115fe4a25c90590e50c9ada94bda797649 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Thu, 4 May 2023 12:48:39 -0700 Subject: [PATCH] Skip non-local posts --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 9b36b2a..5821030 100644 --- a/main.go +++ b/main.go @@ -122,6 +122,10 @@ func commentWorker(ctx context.Context, c *lemmy.WSClient, replyCh chan<- replyJ continue } + if !cr.CommentView.Community.Local { + continue + } + if _, ok := repliedIDs[item{comment, cr.CommentView.Comment.ID}]; ok { continue } @@ -164,6 +168,10 @@ func commentWorker(ctx context.Context, c *lemmy.WSClient, replyCh chan<- replyJ continue } + if !pr.PostView.Community.Local { + continue + } + if _, ok := repliedIDs[item{post, pr.PostView.Post.ID}]; ok { continue }