Skip to content

Commit 6ee6da8

Browse files
authored
🐛 Alert correct users about their defective Mastodon Servers (#3281)
1 parent a9262d7 commit 6ee6da8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/Console/Commands/DatabaseCleaner/MastodonServers.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ private function invalidateServer(MastodonServer $server): void {
133133
}
134134

135135
private function fetchUsers(MastodonServer $server): Collection {
136-
return User::leftJoin('social_login_profiles', 'users.id', '=', 'social_login_profiles.user_id')
137-
->where('social_login_profiles.mastodon_server', $server->id)
138-
->get();
136+
$userIds = DB::table('social_login_profiles')
137+
->where('mastodon_server', $server->id)
138+
->pluck('user_id');
139+
return User::whereIn('id', $userIds)->get();
139140
}
140141

141142
private function notifyUsers(Collection $users, MastodonServer $server): void {

0 commit comments

Comments
 (0)