Fix mentions, that are replies too
This commit is contained in:
parent
6310ff356d
commit
e41cd3b07f
2
http.go
2
http.go
|
@ -96,7 +96,7 @@ func Serve() {
|
||||||
if object, ok := activity["object"].(map[string]interface{}); ok {
|
if object, ok := activity["object"].(map[string]interface{}); ok {
|
||||||
inReplyTo, hasReplyToString := object["inReplyTo"].(string)
|
inReplyTo, hasReplyToString := object["inReplyTo"].(string)
|
||||||
id, hasId := object["id"].(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
|
// It's an ActivityPub reply
|
||||||
fmt.Println("Received reply to:", inReplyTo)
|
fmt.Println("Received reply to:", inReplyTo)
|
||||||
webmentionClient := webmention.New(nil)
|
webmentionClient := webmention.New(nil)
|
||||||
|
|
Reference in New Issue
Block a user