From: Diogo Cordeiro Date: Sat, 20 Apr 2019 22:27:46 +0000 (+0100) Subject: OStatus plugin - Merge some bug fixes by XRevan86 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7b6c887d7688ee874fc899a4a65237439eb85870;p=quix0rs-gnu-social.git OStatus plugin - Merge some bug fixes by XRevan86 --- diff --git a/plugins/OStatus/scripts/resub-feed.php b/plugins/OStatus/scripts/resub-feed.php index 48db9f4e6a..7271d13d57 100755 --- a/plugins/OStatus/scripts/resub-feed.php +++ b/plugins/OStatus/scripts/resub-feed.php @@ -78,7 +78,6 @@ showSub($sub2); function showSub($sub) { print " Subscription state: $sub->sub_state\n"; - print " Verify token: $sub->verify_token\n"; print " Signature secret: $sub->secret\n"; print " Sub start date: $sub->sub_start\n"; print " Sub end date: $sub->sub_end\n"; diff --git a/plugins/OStatus/scripts/update-profile.php b/plugins/OStatus/scripts/update-profile.php index 758c5e6e12..e7e4e2388d 100755 --- a/plugins/OStatus/scripts/update-profile.php +++ b/plugins/OStatus/scripts/update-profile.php @@ -74,10 +74,14 @@ try { $xrd = $disco->lookup($acct); $hints = DiscoveryHints::fromXRD($xrd); - if (empty($feedurl) && !array_key_exists('feedurl', $hints)) { + if (array_key_exists('feedurl', $hints)) { + // Prefer $hints['feedurl'] to current $feedurl value + $feedurl = $hints['feedurl']; + } elseif (empty($feedurl)) { + // if (empty($feedurl) && !array_key_exists('feedurl', $hints)) throw new FeedSubNoFeedException($acct); } - $feedurl = $feedurl ?: $hints['feedurl']; + $salmonuri = array_key_exists('salmon', $hints) ? $hints['salmon'] : $salmonuri; // get the hub data too and put it in the FeedDiscovery object @@ -166,7 +170,6 @@ function showProfile($oprofile) function showSub($sub) { print " Subscription state: $sub->sub_state\n"; - print " Verify token: $sub->verify_token\n"; print " Signature secret: $sub->secret\n"; print " Sub start date: $sub->sub_start\n"; print " Record created: $sub->created\n";