mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update FollowerController, make follow and unfollow methods public
This commit is contained in:
parent
bd3f95415e
commit
6237897def
1 changed files with 3 additions and 3 deletions
|
@ -109,7 +109,7 @@ class FollowerController extends Controller
|
||||||
Cache::forget('user:account:id:'.$user->user_id);
|
Cache::forget('user:account:id:'.$user->user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sendFollow($user, $target)
|
public function sendFollow($user, $target)
|
||||||
{
|
{
|
||||||
if($target->domain == null || $user->domain != null) {
|
if($target->domain == null || $user->domain != null) {
|
||||||
return;
|
return;
|
||||||
|
@ -117,7 +117,7 @@ class FollowerController extends Controller
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
'id' => $user->permalink('#follow/'.$target->id.''),
|
'id' => $user->permalink('#follow/'.$target->id),
|
||||||
'type' => 'Follow',
|
'type' => 'Follow',
|
||||||
'actor' => $user->permalink(),
|
'actor' => $user->permalink(),
|
||||||
'object' => $target->permalink()
|
'object' => $target->permalink()
|
||||||
|
@ -128,7 +128,7 @@ class FollowerController extends Controller
|
||||||
Helpers::sendSignedObject($user, $inbox, $payload);
|
Helpers::sendSignedObject($user, $inbox, $payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sendUndoFollow($user, $target)
|
public function sendUndoFollow($user, $target)
|
||||||
{
|
{
|
||||||
if($target->domain == null || $user->domain != null) {
|
if($target->domain == null || $user->domain != null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue