]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
OStatus plugin - Merge some bug fixes by XRevan86
authorDiogo Cordeiro <diogo@fc.up.pt>
Sat, 20 Apr 2019 22:27:46 +0000 (23:27 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Sat, 20 Apr 2019 22:27:46 +0000 (23:27 +0100)
plugins/OStatus/scripts/resub-feed.php
plugins/OStatus/scripts/update-profile.php

index 48db9f4e6aa213e13b05b37a619102b348b3dfbe..7271d13d5778662151b94a593eaf6ef0c895dc29 100755 (executable)
@@ -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";
index 758c5e6e121a5dcb1e5a823234ba9831fe8667e5..e7e4e2388d5c805e823a17d15cf2428a8cbbbd24 100755 (executable)
@@ -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";