Merge pull request #1591 from pixelfed/frontend-ui-refactor

Update Inbox
This commit is contained in:
daniel 2019-08-12 00:24:28 -06:00 committed by GitHub
commit e6e83cb870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -176,7 +176,7 @@ class Inbox
'following_id' => $target->id,
'local_profile' => empty($actor->domain)
]);
if($follower->wasRecentlyCreated == true) {
if($follower->wasRecentlyCreated == true && $target->domain == null) {
// send notification
Notification::firstOrCreate([
'profile_id' => $target->id,
@ -188,14 +188,19 @@ class Inbox
'item_type' => 'App\Profile'
]);
}
$payload = $this->payload;
// send Accept to remote profile
$accept = [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => $target->permalink().'#accepts/follows/' . $follower->id,
'type' => 'Accept',
'actor' => $target->permalink(),
'object' => $payload
'object' => [
'id' => $actor->permalink('#follows/' . $follower->id),
'actor' => $actor->permalink(),
'type' => 'Follow',
'object' => $target->permalink()
]
];
Helpers::sendSignedObject($target, $actor->inbox_url, $accept);
}