Move Follow to /contact
namespace
This commit is contained in:
parent
3554894577
commit
b5d01337d9
|
@ -62,7 +62,7 @@ class APContact
|
||||||
'addr' => $local_owner['addr'],
|
'addr' => $local_owner['addr'],
|
||||||
'baseurl' => $local_owner['baseurl'],
|
'baseurl' => $local_owner['baseurl'],
|
||||||
'url' => $local_owner['url'],
|
'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'])) {
|
if (!empty($local_owner['alias']) && ($local_owner['url'] != $local_owner['alias'])) {
|
||||||
$data['alias'] = $local_owner['alias'];
|
$data['alias'] = $local_owner['alias'];
|
||||||
|
|
|
@ -341,7 +341,7 @@ class Profile
|
||||||
if ($visitor_is_following) {
|
if ($visitor_is_following) {
|
||||||
$unfollow_link = $visitor_base_path . '/contact/unfollow?url=' . urlencode($profile_url) . '&auto=1';
|
$unfollow_link = $visitor_base_path . '/contact/unfollow?url=' . urlencode($profile_url) . '&auto=1';
|
||||||
} else {
|
} 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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ class Follow extends BaseModule
|
||||||
|
|
||||||
protected function process(string $url)
|
protected function process(string $url)
|
||||||
{
|
{
|
||||||
$returnPath = 'follow?rul=' . urlencode($url);
|
$returnPath = 'follow?url=' . urlencode($url);
|
||||||
|
|
||||||
$result = Contact::createFromProbeForUser($this->app->getLoggedInUserId(), $url);
|
$result = Contact::createFromProbeForUser($this->app->getLoggedInUserId(), $url);
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Xrd extends BaseModule
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
||||||
'template' => $baseURL . '/follow?url={uri}',
|
'template' => $baseURL . '/contact/follow?url={uri}',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rel' => ActivityNamespace::FEED,
|
'rel' => ActivityNamespace::FEED,
|
||||||
|
@ -212,7 +212,7 @@ class Xrd extends BaseModule
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
||||||
'template' => $baseURL . '/follow?url={uri}',
|
'template' => $baseURL . '/contact/follow?url={uri}',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rel' => 'magic-public-key',
|
'rel' => 'magic-public-key',
|
||||||
|
@ -312,7 +312,7 @@ class Xrd extends BaseModule
|
||||||
'11:link' => [
|
'11:link' => [
|
||||||
'@attributes' => [
|
'@attributes' => [
|
||||||
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
||||||
'template' => $baseURL . '/follow?url={uri}'
|
'template' => $baseURL . '/contact/follow?url={uri}'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'12:link' => [
|
'12:link' => [
|
||||||
|
|
|
@ -2185,7 +2185,7 @@ class Probe
|
||||||
'xmpp' => $owner['xmpp'], 'matrix' => $owner['matrix'],
|
'xmpp' => $owner['xmpp'], 'matrix' => $owner['matrix'],
|
||||||
'hide' => !$owner['net-publish'], 'batch' => '', 'notify' => $owner['notify'],
|
'hide' => !$owner['net-publish'], 'batch' => '', 'notify' => $owner['notify'],
|
||||||
'poll' => $owner['poll'], 'request' => $owner['request'], 'confirm' => $owner['confirm'],
|
'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'],
|
'following' => $approfile['following'], 'followers' => $approfile['followers'],
|
||||||
'inbox' => $approfile['inbox'], 'outbox' => $approfile['outbox'],
|
'inbox' => $approfile['inbox'], 'outbox' => $approfile['outbox'],
|
||||||
'sharedinbox' => $approfile['endpoints']['sharedInbox'], 'network' => Protocol::DFRN,
|
'sharedinbox' => $approfile['endpoints']['sharedInbox'], 'network' => Protocol::DFRN,
|
||||||
|
|
|
@ -387,6 +387,7 @@ return [
|
||||||
'/hidden' => [Module\Contact::class, [R::GET]],
|
'/hidden' => [Module\Contact::class, [R::GET]],
|
||||||
'/ignored' => [Module\Contact::class, [R::GET]],
|
'/ignored' => [Module\Contact::class, [R::GET]],
|
||||||
'/hovercard' => [Module\Contact\Hovercard::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]],
|
'/unfollow' => [Module\Contact\Unfollow::class, [R::GET, R::POST]],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -418,7 +419,6 @@ return [
|
||||||
'/filed' => [Module\Search\Filed::class, [R::GET]],
|
'/filed' => [Module\Search\Filed::class, [R::GET]],
|
||||||
'/filer[/{id:\d+}]' => [Module\Filer\SaveTag::class, [R::GET]],
|
'/filer[/{id:\d+}]' => [Module\Filer\SaveTag::class, [R::GET]],
|
||||||
'/filerm/{id:\d+}' => [Module\Filer\RemoveTag::class, [R::GET, R::POST]],
|
'/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]],
|
'/follow_confirm' => [Module\FollowConfirm::class, [R::GET, R::POST]],
|
||||||
'/followers/{nickname}' => [Module\ActivityPub\Followers::class, [R::GET]],
|
'/followers/{nickname}' => [Module\ActivityPub\Followers::class, [R::GET]],
|
||||||
'/following/{nickname}' => [Module\ActivityPub\Following::class, [R::GET]],
|
'/following/{nickname}' => [Module\ActivityPub\Following::class, [R::GET]],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user