mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update notification pipelines, fix non-local saving
This commit is contained in:
parent
4d4013896c
commit
fa97a1f38e
4 changed files with 50 additions and 42 deletions
|
@ -91,6 +91,7 @@ class CommentPipeline implements ShouldQueue
|
|||
return;
|
||||
}
|
||||
|
||||
if($target->user_id && $target->domain === null) {
|
||||
DB::transaction(function() use($target, $actor, $comment) {
|
||||
$notification = new Notification();
|
||||
$notification->profile_id = $target->id;
|
||||
|
@ -104,6 +105,7 @@ class CommentPipeline implements ShouldQueue
|
|||
NotificationService::set($notification->profile_id, $notification->id);
|
||||
StatusService::del($comment->id);
|
||||
});
|
||||
}
|
||||
|
||||
if($exists = Cache::get('status:replies:all:' . $status->id)) {
|
||||
if($exists && $exists->count() == 3) {
|
||||
|
|
|
@ -72,6 +72,7 @@ class FollowPipeline implements ShouldQueue
|
|||
$target->save();
|
||||
AccountService::del($target->id);
|
||||
|
||||
if($target->user_id && $target->domain === null) {
|
||||
try {
|
||||
$notification = new Notification();
|
||||
$notification->profile_id = $target->id;
|
||||
|
@ -84,4 +85,5 @@ class FollowPipeline implements ShouldQueue
|
|||
Log::error($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ class LikePipeline implements ShouldQueue
|
|||
return true;
|
||||
}
|
||||
|
||||
if($status->uri === null && $status->object_url === null && $status->url === null) {
|
||||
try {
|
||||
$notification = new Notification();
|
||||
$notification->profile_id = $status->profile_id;
|
||||
|
@ -91,6 +92,7 @@ class LikePipeline implements ShouldQueue
|
|||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function remoteLikeDeliver()
|
||||
{
|
||||
|
|
|
@ -87,6 +87,7 @@ class StatusReplyPipeline implements ShouldQueue
|
|||
Cache::forget('status:replies:all:' . $reply->id);
|
||||
Cache::forget('status:replies:all:' . $status->id);
|
||||
|
||||
if($target->user_id && $target->domain === null) {
|
||||
DB::transaction(function() use($target, $actor, $status) {
|
||||
$notification = new Notification();
|
||||
$notification->profile_id = $target->id;
|
||||
|
@ -99,6 +100,7 @@ class StatusReplyPipeline implements ShouldQueue
|
|||
NotificationService::setNotification($notification);
|
||||
NotificationService::set($notification->profile_id, $notification->id);
|
||||
});
|
||||
}
|
||||
|
||||
if($exists = Cache::get('status:replies:all:' . $reply->id)) {
|
||||
if($exists && $exists->count() == 3) {
|
||||
|
|
Loading…
Reference in a new issue