mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update ApiV1Controller, improve refresh relations logic when (un)muting or (un)blocking
This commit is contained in:
parent
b7322b6874
commit
b8e96a5ff3
1 changed files with 3 additions and 2 deletions
|
@ -1200,8 +1200,8 @@ class ApiV1Controller extends Controller
|
|||
if ($filter) {
|
||||
$filter->delete();
|
||||
UserFilterService::unblock($pid, $profile->id);
|
||||
RelationshipService::refresh($pid, $id);
|
||||
}
|
||||
RelationshipService::refresh($pid, $id);
|
||||
|
||||
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
@ -2207,9 +2207,10 @@ class ApiV1Controller extends Controller
|
|||
if ($filter) {
|
||||
$filter->delete();
|
||||
UserFilterService::unmute($pid, $profile->id);
|
||||
RelationshipService::refresh($pid, $id);
|
||||
}
|
||||
|
||||
RelationshipService::refresh($pid, $id);
|
||||
|
||||
$resource = new Fractal\Resource\Item($profile, new RelationshipTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
|
|
Loading…
Reference in a new issue