optionally use note.user relation in PollService.deliverQuestionUpdate
This commit is contained in:
parent
db4cd29b74
commit
a4a8329f69
1 changed files with 1 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue