mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update UserFilter model
This commit is contained in:
parent
de1ebae425
commit
4db7b72747
1 changed files with 17 additions and 0 deletions
|
@ -12,4 +12,21 @@ class UserFilter extends Model
|
||||||
'filterable_type',
|
'filterable_type',
|
||||||
'filter_type',
|
'filter_type',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function mutedUserIds($profile_id)
|
||||||
|
{
|
||||||
|
return $this->whereUserId($profile_id)
|
||||||
|
->whereFilterableType('App\Profile')
|
||||||
|
->whereFilterType('mute')
|
||||||
|
->pluck('filterable_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function blockedUserIds($profile_id)
|
||||||
|
{
|
||||||
|
return $this->whereUserId($profile_id)
|
||||||
|
->whereFilterableType('App\Profile')
|
||||||
|
->whereFilterType('block')
|
||||||
|
->pluck('filterable_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue