improvement

This commit is contained in:
piuvas 2024-12-26 12:27:00 -03:00 committed by kakkokari-gtyih
parent 7a99bf76ea
commit 9720576f69
1 changed files with 1 additions and 2 deletions

View File

@ -104,8 +104,7 @@ export default abstract class Channel {
public onMessage?(type: string, body: JsonValue): void;
public async assignMyReaction(note: Packed<'Note'>, noteEntityService: NoteEntityService) {
if (this.user === undefined) { return; }
if (Object.keys(note.reactions).length > 0) {
if (this.user && Object.keys(note.reactions).length > 0) {
const myReaction = await noteEntityService.populateMyReaction(note, this.user.id);
note.myReaction = myReaction;
}