From c1e3cfe7a782aa81b4d478901305ecd1ebc905cc Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 20 Feb 2015 14:47:12 +0100 Subject: [PATCH] ensureFeedURL will return Ostatus_profile early if already stored --- plugins/OStatus/classes/Ostatus_profile.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 325e602653..77b1e9bef5 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1120,6 +1120,11 @@ class Ostatus_profile extends Managed_DataObject */ public static function ensureFeedURL($feed_url, array $hints=array()) { + $oprofile = Ostatus_profile::getKV('feeduri', $feed_url); + if ($oprofile instanceof Ostatus_profile) { + return $oprofile; + } + $discover = new FeedDiscovery(); $feeduri = $discover->discoverFromFeedURL($feed_url); -- 2.39.5