[FEEDS][Home] Fix bug nickname is not unique, but it is for local users

This commit is contained in:
Diogo Peralta Cordeiro 2021-12-02 03:33:06 +00:00
parent d64bd17422
commit 30f3e2c462
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0

View File

@ -70,7 +70,7 @@ class Feeds extends Controller
public function home(Request $request, string $nickname)
{
try {
$target = DB::findOneBy('actor', ['nickname' => $nickname]);
$target = DB::findOneBy('actor', ['nickname' => $nickname, 'is_local' => true]);
} catch (NotFoundException) {
throw new ClientException(_m('User {nickname} doesn\'t exist', ['{nickname}' => $nickname]));
}