fix(cdn-caching): 自分のリアクションが表示されない問題を修正 (MisskeyIO#851)
This commit is contained in:
parent
5073467f1d
commit
8b17ab77b4
13 changed files with 103 additions and 71 deletions
|
@ -19,7 +19,7 @@ class LocalTimelineChannel extends Channel {
|
|||
private withRenotes: boolean;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
private idOnly: boolean;
|
||||
private minimize: boolean;
|
||||
|
||||
constructor(
|
||||
private metaService: MetaService,
|
||||
|
@ -41,7 +41,7 @@ class LocalTimelineChannel extends Channel {
|
|||
this.withRenotes = params.withRenotes ?? true;
|
||||
this.withReplies = params.withReplies ?? false;
|
||||
this.withFiles = params.withFiles ?? false;
|
||||
this.idOnly = params.idOnly ?? false;
|
||||
this.minimize = params.minimize ?? false;
|
||||
|
||||
// Subscribe events
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
|
@ -90,9 +90,13 @@ class LocalTimelineChannel extends Channel {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
|
||||
const idOnlyNote = { id: note.id };
|
||||
this.send('note', idOnlyNote);
|
||||
if (this.minimize && ['public', 'home'].includes(note.visibility)) {
|
||||
this.send('note', {
|
||||
id: note.id, myReaction: note.myReaction,
|
||||
poll: note.poll ? { choices: note.poll.choices } : undefined,
|
||||
reply: note.reply ? { myReaction: note.reply.myReaction } : undefined,
|
||||
renote: note.renote ? { myReaction: note.renote.myReaction } : undefined,
|
||||
});
|
||||
} else {
|
||||
this.connection.cacheNote(note);
|
||||
this.send('note', note);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue