comment code

This commit is contained in:
piuvas 2025-01-08 13:10:20 -03:00 committed by kakkokari-gtyih
parent 750c05ba7c
commit a8bb03fcd2
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ export default abstract class Channel {
public async assignMyReaction(note: Packed<'Note'>, noteEntityService: NoteEntityService): Promise<Packed<'Note'>> {
let changed = false;
// cloning here seems like the best solution for a race condition
// where multiple users shared the same myReaction. (Sharkey #877)
const clonedNote = { ...note };
if (this.user && isRenotePacked(note) && !isQuotePacked(note)) {
if (note.renote && Object.keys(note.renote.reactions).length > 0) {