optionally use note.user relation in PollService.deliverQuestionUpdate

This commit is contained in:
Hazelnoot 2025-06-19 13:52:42 -04:00
parent db4cd29b74
commit a4a8329f69

View file

@ -92,7 +92,7 @@ export class PollService {
public async deliverQuestionUpdate(note: MiNote) {
if (note.localOnly) return;
const user = await this.usersRepository.findOneBy({ id: note.userId });
const user = note.user ?? await this.usersRepository.findOneBy({ id: note.userId });
if (user == null) throw new Error('note not found');
if (isLocalUser(user)) {