From 44af09f389362df4c6415a1935d336ea7205d3f9 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 20 Jun 2018 09:49:58 -0700 Subject: [PATCH] don't prompt to send webmentions to URLs in the post author --- controllers/Controller.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/Controller.php b/controllers/Controller.php index 3b34920..562d2a6 100644 --- a/controllers/Controller.php +++ b/controllers/Controller.php @@ -307,6 +307,9 @@ class Controller { $parsed = $xray->parse($sourceURL, $source['body']); if($parsed && isset($parsed['data'])) { + // Remove the author object to avoid sending webmentions to your own home page + if(isset($parsed['data']['author'])) + unset($parsed['data']['author']); $links = Telegraph\FindLinks::all($parsed['data']); } else { $links = [];