mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Merge pull request #2206 from pixelfed/staging
Update AP Inbox, add follow notifications
This commit is contained in:
commit
f5fdd7d31c
2 changed files with 10 additions and 12 deletions
|
@ -39,7 +39,8 @@
|
||||||
- Updated Inbox, move expensive HTTP Signature validation to job queue ([f2ae45e5a](https://github.com/pixelfed/pixelfed/commit/f2ae45e5a))
|
- Updated Inbox, move expensive HTTP Signature validation to job queue ([f2ae45e5a](https://github.com/pixelfed/pixelfed/commit/f2ae45e5a))
|
||||||
- Updated MomentUI, fix bugs and improve UI ([90b89cb8](https://github.com/pixelfed/pixelfed/commit/90b89cb8))
|
- Updated MomentUI, fix bugs and improve UI ([90b89cb8](https://github.com/pixelfed/pixelfed/commit/90b89cb8))
|
||||||
- Updated PostComponent, improve embed model. Fixes ([#2189](https://github.com/pixelfed/pixelfed/issues/2189)) ([b12e504e](https://github.com/pixelfed/pixelfed/commit/b12e504e))
|
- Updated PostComponent, improve embed model. Fixes ([#2189](https://github.com/pixelfed/pixelfed/issues/2189)) ([b12e504e](https://github.com/pixelfed/pixelfed/commit/b12e504e))
|
||||||
- Updated PostComponent, hide edit button after 24 hours. Fixes [#2188](https://github.com/pixelfed/pixelfed/issues/2188)) ([a1fee6a2](https://github.com/pixelfed/pixelfed/commit/a1fee6a2))
|
- Updated PostComponent, hide edit button after 24 hours. Fixes ([#2188](https://github.com/pixelfed/pixelfed/issues/2188)) ([a1fee6a2](https://github.com/pixelfed/pixelfed/commit/a1fee6a2))
|
||||||
|
- Updated AP Inbox, add follow notifications ([b8819fbb](https://github.com/pixelfed/pixelfed/commit/b8819fbb))
|
||||||
|
|
||||||
|
|
||||||
## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
|
## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
|
||||||
|
|
|
@ -197,18 +197,9 @@ class Inbox
|
||||||
$follower->profile_id = $actor->id;
|
$follower->profile_id = $actor->id;
|
||||||
$follower->following_id = $target->id;
|
$follower->following_id = $target->id;
|
||||||
$follower->local_profile = empty($actor->domain);
|
$follower->local_profile = empty($actor->domain);
|
||||||
|
$follower->save();
|
||||||
|
|
||||||
if($target->domain == null) {
|
FollowPipeline::dispatch($follower);
|
||||||
Notification::firstOrCreate([
|
|
||||||
'profile_id' => $target->id,
|
|
||||||
'actor_id' => $actor->id,
|
|
||||||
'action' => 'follow',
|
|
||||||
'message' => $follower->toText(),
|
|
||||||
'rendered' => $follower->toHtml(),
|
|
||||||
'item_id' => $target->id,
|
|
||||||
'item_type' => 'App\Profile'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// send Accept to remote profile
|
// send Accept to remote profile
|
||||||
$accept = [
|
$accept = [
|
||||||
|
@ -446,6 +437,12 @@ class Inbox
|
||||||
Follower::whereProfileId($profile->id)
|
Follower::whereProfileId($profile->id)
|
||||||
->whereFollowingId($following->id)
|
->whereFollowingId($following->id)
|
||||||
->delete();
|
->delete();
|
||||||
|
Notification::whereProfileId($following->id)
|
||||||
|
->whereActorId($profile->id)
|
||||||
|
->whereAction('follow')
|
||||||
|
->whereItemId($following->id)
|
||||||
|
->whereItemType('App\Profile')
|
||||||
|
->forceDelete();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Like':
|
case 'Like':
|
||||||
|
|
Loading…
Reference in a new issue