requested changes

This commit is contained in:
piuvas 2025-01-10 22:10:18 -03:00
parent a3fc9a1085
commit f1d9bb2cf1
No known key found for this signature in database
GPG key ID: 82743F52454C621D

View file

@ -9,8 +9,8 @@ import { isUserRelated } from '@/misc/is-user-related.js';
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js'; import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
import type { Packed } from '@/misc/json-schema.js'; import type { Packed } from '@/misc/json-schema.js';
import type { JsonObject, JsonValue } from '@/misc/json-value.js'; import type { JsonObject, JsonValue } from '@/misc/json-value.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import type Connection from './Connection.js'; import type Connection from './Connection.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
/** /**
* Stream channel * Stream channel
@ -105,7 +105,7 @@ export default abstract class Channel {
public async assignMyReaction(note: Packed<'Note'>, noteEntityService: NoteEntityService): Promise<Packed<'Note'>> { public async assignMyReaction(note: Packed<'Note'>, noteEntityService: NoteEntityService): Promise<Packed<'Note'>> {
let changed = false; let changed = false;
// cloning here seems like the best solution for a race condition // cloning here seems like the best solution for not sharing changes with other users.
// where multiple users shared the same myReaction. (Sharkey #877) // where multiple users shared the same myReaction. (Sharkey #877)
const clonedNote = { ...note }; const clonedNote = { ...note };
if (this.user && isRenotePacked(note) && !isQuotePacked(note)) { if (this.user && isRenotePacked(note) && !isQuotePacked(note)) {
@ -139,7 +139,6 @@ export default abstract class Channel {
} }
} }
export type MiChannelService<T extends boolean> = { export type MiChannelService<T extends boolean> = {
shouldShare: boolean; shouldShare: boolean;
requireCredential: T; requireCredential: T;