連合なしアンケートのUpdateがリモートに配信されてしまうのを修正 (MisskeyIO#177)

Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
This commit is contained in:
riku6460 2023-10-07 20:26:16 +09:00 committed by GitHub
parent 99e14d3a54
commit 61246e8779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ export class PollService {
const note = await this.notesRepository.findOneBy({ id: noteId }); const note = await this.notesRepository.findOneBy({ id: noteId });
if (note == null) throw new Error('note not found'); if (note == null) throw new Error('note not found');
if (note.localOnly) return;
const user = await this.usersRepository.findOneBy({ id: note.userId }); const user = await this.usersRepository.findOneBy({ id: note.userId });
if (user == null) throw new Error('note not found'); if (user == null) throw new Error('note not found');