Fix regression in comment mutes/blocks
This commit is contained in:
parent
2cd389e229
commit
60e9d547ae
3 changed files with 36 additions and 1 deletions
|
@ -13,6 +13,7 @@ use App\Jobs\StatusPipeline\NewStatusPipeline;
|
|||
use App\Util\Lexer\Autolink;
|
||||
use App\Profile;
|
||||
use App\Status;
|
||||
use App\UserFilter;
|
||||
use League\Fractal;
|
||||
use App\Transformer\Api\StatusTransformer;
|
||||
use League\Fractal\Serializer\ArraySerializer;
|
||||
|
@ -57,6 +58,16 @@ class CommentController extends Controller
|
|||
return;
|
||||
}
|
||||
|
||||
$filtered = UserFilter::whereUserId($status->profile_id)
|
||||
->whereFilterableType('App\Profile')
|
||||
->whereIn('filter_type', ['mute', 'block'])
|
||||
->whereFilterableId($profile->id)
|
||||
->exists();
|
||||
|
||||
if($filtered == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
$reply = DB::transaction(function() use($comment, $status, $profile) {
|
||||
$autolink = Autolink::create()->autolink($comment);
|
||||
$reply = new Status();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue