]> git.mxchange.org Git - friendica.git/commitdiff
Move Follow to `/contact` namespace
authorPhilipp <admin@philipp.info>
Mon, 31 Oct 2022 16:58:04 +0000 (17:58 +0100)
committerPhilipp <admin@philipp.info>
Mon, 31 Oct 2022 19:58:27 +0000 (20:58 +0100)
src/Model/APContact.php
src/Model/Profile.php
src/Module/Contact/Follow.php
src/Module/Xrd.php
src/Network/Probe.php
static/routes.config.php

index 7b49bab8abf77248eaf9252a9f555fdd197785bd..742efcf190cae7561dcc2e679c2c5010046788c1 100644 (file)
@@ -62,7 +62,7 @@ class APContact
                                'addr'      => $local_owner['addr'],
                                'baseurl'   => $local_owner['baseurl'],
                                'url'       => $local_owner['url'],
-                               'subscribe' => $local_owner['baseurl'] . '/follow?url={uri}'];
+                               'subscribe' => $local_owner['baseurl'] . '/contact/follow?url={uri}'];
 
                        if (!empty($local_owner['alias']) && ($local_owner['url'] != $local_owner['alias'])) {
                                $data['alias'] = $local_owner['alias'];
index b73b235385047b59d3e41343ac087097403457cb..29f6b29376362f4e6645cf2dfbb6ecb79b7a8f4f 100644 (file)
@@ -341,7 +341,7 @@ class Profile
                                if ($visitor_is_following) {
                                        $unfollow_link = $visitor_base_path . '/contact/unfollow?url=' . urlencode($profile_url) . '&auto=1';
                                } else {
-                                       $follow_link =  $visitor_base_path . '/follow?url=' . urlencode($profile_url) . '&auto=1';
+                                       $follow_link =  $visitor_base_path .'/contact/follow?url=' . urlencode($profile_url) . '&auto=1';
                                }
                        }
 
index 7504501d417c4df06866c0d07f99b904bf5e465d..fe523f491e9190ad5f2321b89bafeec217cd55e2 100644 (file)
@@ -202,7 +202,7 @@ class Follow extends BaseModule
 
        protected function process(string $url)
        {
-               $returnPath = 'follow?rul=' . urlencode($url);
+               $returnPath = 'follow?url=' . urlencode($url);
 
                $result = Contact::createFromProbeForUser($this->app->getLoggedInUserId(), $url);
 
index 098c1574ea3315c797207c0748f9ae2c6450bafd..4e4603fbdb20dcc3848a7d8bc6d98603d9b41eb6 100644 (file)
@@ -122,7 +122,7 @@ class Xrd extends BaseModule
                                ],
                                [
                                        'rel'      => 'http://ostatus.org/schema/1.0/subscribe',
-                                       'template' => $baseURL . '/follow?url={uri}',
+                                       'template' => $baseURL . '/contact/follow?url={uri}',
                                ],
                                [
                                        'rel'  => ActivityNamespace::FEED,
@@ -212,7 +212,7 @@ class Xrd extends BaseModule
                                ],
                                [
                                        'rel'      => 'http://ostatus.org/schema/1.0/subscribe',
-                                       'template' => $baseURL . '/follow?url={uri}',
+                                       'template' => $baseURL . '/contact/follow?url={uri}',
                                ],
                                [
                                        'rel'  => 'magic-public-key',
@@ -312,7 +312,7 @@ class Xrd extends BaseModule
                                '11:link' => [
                                        '@attributes' => [
                                                'rel'  => 'http://ostatus.org/schema/1.0/subscribe',
-                                               'template' => $baseURL . '/follow?url={uri}'
+                                               'template' => $baseURL . '/contact/follow?url={uri}'
                                        ]
                                ],
                                '12:link' => [
index 43f1dca66f2b64bdfee99b6dfd21cc740fd59c22..45b838da215cfaf7cf97544588986893c90469d9 100644 (file)
@@ -2185,7 +2185,7 @@ class Probe
                                'xmpp'             => $owner['xmpp'], 'matrix' => $owner['matrix'],
                                'hide'             => !$owner['net-publish'], 'batch' => '', 'notify' => $owner['notify'],
                                'poll'             => $owner['poll'], 'request' => $owner['request'], 'confirm' => $owner['confirm'],
-                               'subscribe'        => $approfile['generator']['url'] . '/follow?url={uri}', 'poco' => $owner['poco'],
+                               'subscribe'        => $approfile['generator']['url'] . '/contact/follow?url={uri}', 'poco' => $owner['poco'],
                                'following'        => $approfile['following'], 'followers' => $approfile['followers'],
                                'inbox'            => $approfile['inbox'], 'outbox' => $approfile['outbox'],
                                'sharedinbox'      => $approfile['endpoints']['sharedInbox'], 'network' => Protocol::DFRN,
index 072ee93878a6a3575f0c4d3d5c2a8a23fc52321a..d21e9efae5b11822ce4a490abffe3f98a1cceec1 100644 (file)
@@ -387,6 +387,7 @@ return [
                '/hidden'                     => [Module\Contact::class,           [R::GET]],
                '/ignored'                    => [Module\Contact::class,           [R::GET]],
                '/hovercard'                  => [Module\Contact\Hovercard::class, [R::GET]],
+               '/follow[/{url}]'                 => [Module\Contact\Follow::class,    [R::GET, R::POST]],
                '/unfollow'                   => [Module\Contact\Unfollow::class,  [R::GET, R::POST]],
        ],
 
@@ -418,7 +419,6 @@ return [
        '/filed'                => [Module\Search\Filed::class,          [R::GET]],
        '/filer[/{id:\d+}]'     => [Module\Filer\SaveTag::class,         [R::GET]],
        '/filerm/{id:\d+}'      => [Module\Filer\RemoveTag::class,       [R::GET, R::POST]],
-       '/follow[/{url}]'       => [Module\Contact\Follow::class,        [R::GET, R::POST]],
        '/follow_confirm'       => [Module\FollowConfirm::class,         [R::GET, R::POST]],
        '/followers/{nickname}' => [Module\ActivityPub\Followers::class, [R::GET]],
        '/following/{nickname}' => [Module\ActivityPub\Following::class, [R::GET]],