mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update StatusPipeline
This commit is contained in:
parent
b4f0d1586d
commit
7295b1b887
2 changed files with 10 additions and 12 deletions
|
@ -41,16 +41,6 @@ class NewStatusPipeline implements ShouldQueue
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
$status = $this->status;
|
||||
|
||||
StatusEntityLexer::dispatch($status);
|
||||
|
||||
if(config('pixelfed.activitypub_enabled') == true) {
|
||||
StatusActivityPubDeliver::dispatch($status);
|
||||
}
|
||||
|
||||
// Cache::forever('post.'.$status->id, $status);
|
||||
// $redis = Redis::connection();
|
||||
// $redis->lpush(config('cache.prefix').':user.'.$status->profile_id.'.posts', $status->id);
|
||||
StatusEntityLexer::dispatch($this->status);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,6 @@ class StatusEntityLexer implements ShouldQueue
|
|||
public function storeEntities()
|
||||
{
|
||||
$this->storeHashtags();
|
||||
$this->storeMentions();
|
||||
DB::transaction(function () {
|
||||
$status = $this->status;
|
||||
$status->rendered = nl2br($this->autolink);
|
||||
|
@ -100,6 +99,7 @@ class StatusEntityLexer implements ShouldQueue
|
|||
);
|
||||
});
|
||||
}
|
||||
$this->storeMentions();
|
||||
}
|
||||
|
||||
public function storeMentions()
|
||||
|
@ -123,5 +123,13 @@ class StatusEntityLexer implements ShouldQueue
|
|||
MentionPipeline::dispatch($status, $m);
|
||||
});
|
||||
}
|
||||
$this->deliver();
|
||||
}
|
||||
|
||||
public function deliver()
|
||||
{
|
||||
if(config('pixelfed.activitypub_enabled') == true) {
|
||||
StatusActivityPubDeliver::dispatch($this->status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue