From e41cd3b07f750b0944e0a433f2921f527c8f2dfe Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Thu, 2 Apr 2020 22:45:06 +0200 Subject: [PATCH] Fix mentions, that are replies too --- http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.go b/http.go index 21d2709..f0bb900 100644 --- a/http.go +++ b/http.go @@ -96,7 +96,7 @@ func Serve() { if object, ok := activity["object"].(map[string]interface{}); ok { inReplyTo, hasReplyToString := object["inReplyTo"].(string) id, hasId := object["id"].(string) - if hasReplyToString && hasId && len(inReplyTo) > 0 && len(id) > 0 { + if hasReplyToString && hasId && len(inReplyTo) > 0 && len(id) > 0 && strings.Contains(inReplyTo, actor.iri) { // It's an ActivityPub reply fmt.Println("Received reply to:", inReplyTo) webmentionClient := webmention.New(nil)