@ -27,12 +27,12 @@ use App\Status;
use App\Story;
use App\User;
use App\Util\ActivityPub\Helpers;
use Cache;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use Storage;
use Illuminate\Support\Facades\ Storage;
trait AdminReportController
{
@ -230,7 +230,7 @@ trait AdminReportController
AccountInterstitial::chunk(500, function ($reports) {
foreach ($reports as $report) {
if ($report->item_type != \App\ Status::class) {
if ($report->item_type != Status::class) {
continue;
}
@ -326,7 +326,7 @@ trait AdminReportController
if ($action == 'dismiss-all') {
AccountInterstitial::whereType('post.autospam')
->whereItemType(\App\ Status::class)
->whereItemType(Status::class)
->whereNull('appeal_handled_at')
->whereUserId($appeal->user_id)
->update(['appeal_handled_at' => $now, 'is_spam' => true]);
@ -339,7 +339,7 @@ trait AdminReportController
if ($action == 'approve-all') {
AccountInterstitial::whereType('post.autospam')
->whereItemType(\App\ Status::class)
->whereItemType(Status::class)
->whereNull('appeal_handled_at')
->whereUserId($appeal->user_id)
->get()
@ -365,7 +365,7 @@ trait AdminReportController
if ($action == 'mark-spammer') {
AccountInterstitial::whereType('post.autospam')
->whereItemType(\App\ Status::class)
->whereItemType(Status::class)
->whereNull('appeal_handled_at')
->whereUserId($appeal->user_id)
->update(['appeal_handled_at' => $now, 'is_spam' => true]);
@ -777,7 +777,7 @@ trait AdminReportController
->save();
Report::where('reported_profile_id', $profile->id)
->whereObjectType(\App\ Story::class)
->whereObjectType(Story::class)
->whereNull('admin_seen')
->update([
'admin_seen' => now(),
@ -803,9 +803,9 @@ trait AdminReportController
return [200];
case 'nsfw':
if ($report->object_type === \App\ Profile::class) {
if ($report->object_type === Profile::class) {
$profile = Profile::find($report->object_id);
} elseif ($report->object_type === \App\ Status::class) {
} elseif ($report->object_type === Status::class) {
$status = Status::find($report->object_id);
if (! $status) {
return [200];
@ -862,9 +862,9 @@ trait AdminReportController
return [200];
case 'unlist':
if ($report->object_type === \App\ Profile::class) {
if ($report->object_type === Profile::class) {
$profile = Profile::find($report->object_id);
} elseif ($report->object_type === \App\ Status::class) {
} elseif ($report->object_type === Status::class) {
$status = Status::find($report->object_id);
if (! $status) {
return [200];
@ -921,9 +921,9 @@ trait AdminReportController
return [200];
case 'private':
if ($report->object_type === \App\ Profile::class) {
if ($report->object_type === Profile::class) {
$profile = Profile::find($report->object_id);
} elseif ($report->object_type === \App\ Status::class) {
} elseif ($report->object_type === Status::class) {
$status = Status::find($report->object_id);
if (! $status) {
return [200];
@ -984,9 +984,9 @@ trait AdminReportController
abort(404);
}
if ($report->object_type === \App\ Profile::class) {
if ($report->object_type === Profile::class) {
$profile = Profile::find($report->object_id);
} elseif ($report->object_type === \App\ Status::class) {
} elseif ($report->object_type === Status::class) {
$status = Status::find($report->object_id);
if (! $status) {
return [200];
@ -1297,7 +1297,7 @@ trait AdminReportController
if ($action == 'mark-all-read') {
AccountInterstitial::whereType('post.autospam')
->whereItemType(\App\ Status::class)
->whereItemType(Status::class)
->whereNull('appeal_handled_at')
->whereUserId($appeal->user_id)
->update([
@ -1308,7 +1308,7 @@ trait AdminReportController
if ($action == 'mark-all-not-spam') {
AccountInterstitial::whereType('post.autospam')
->whereItemType(\App\ Status::class)
->whereItemType(Status::class)
->whereUserId($appeal->user_id)
->get()
->each(function ($report) use ($meta) {