Skip to content
Snippets Groups Projects
Unverified Commit f1d9bb2c authored by piuvas's avatar piuvas
Browse files

requested changes

parent a3fc9a10
No related branches found
No related tags found
2 merge requests!9272025.2.2,!854Clone note when adding myReaction to streamed notes.
......@@ -9,8 +9,8 @@ import { isUserRelated } from '@/misc/is-user-related.js';
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
import type { Packed } from '@/misc/json-schema.js';
import type { JsonObject, JsonValue } from '@/misc/json-value.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import type Connection from './Connection.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
/**
* Stream channel
......@@ -105,7 +105,7 @@ 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
// cloning here seems like the best solution for not sharing changes with other users.
// where multiple users shared the same myReaction. (Sharkey #877)
const clonedNote = { ...note };
if (this.user && isRenotePacked(note) && !isQuotePacked(note)) {
......@@ -139,7 +139,6 @@ export default abstract class Channel {
}
}
export type MiChannelService<T extends boolean> = {
shouldShare: boolean;
requireCredential: T;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment