spec(backend/stream): モデレーターにも一般ユーザーと同じく通常の投稿はcdn経由で配信するように (MisskeyIO#920)
This commit is contained in:
parent
d7d270b789
commit
020c4f1716
14 changed files with 97 additions and 43 deletions
|
@ -4,11 +4,11 @@
|
|||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import { isQuotePacked, isRenotePacked } from '@/misc/is-renote.js';
|
||||
import Channel, { type MiChannelService } from '../channel.js';
|
||||
|
||||
|
@ -95,11 +95,14 @@ class LocalTimelineChannel extends Channel {
|
|||
}
|
||||
|
||||
if (this.minimize && ['public', 'home'].includes(note.visibility)) {
|
||||
const badgeRoles = this.iAmModerator ? await this.roleService.getUserBadgeRoles(note.userId, false) : undefined;
|
||||
|
||||
this.send('note', {
|
||||
id: note.id, myReaction: note.myReaction,
|
||||
poll: note.poll?.choices ? { choices: note.poll.choices } : undefined,
|
||||
reply: note.reply?.myReaction ? { myReaction: note.reply.myReaction } : undefined,
|
||||
renote: note.renote?.myReaction ? { myReaction: note.renote.myReaction } : undefined,
|
||||
...(badgeRoles?.length ? { user: { badgeRoles } } : {}),
|
||||
});
|
||||
} else {
|
||||
this.send('note', note);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue