comment code

This commit is contained in:
piuvas 2025-01-08 13:10:20 -03:00
parent e76e6cd08f
commit a3fc9a1085
No known key found for this signature in database
GPG key ID: 82743F52454C621D

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) {