summaryrefslogtreecommitdiff
path: root/src/server/api/stream/channels/hybrid-timeline.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2021-09-12 01:12:23 +0900
committerGitHub <noreply@github.com>2021-09-12 01:12:23 +0900
commit53f3b779bf16abcda4f6e026c51384f3b8fbcc62 (patch)
tree7c4bfeb42a3fdbc9e2fa36771a2bc2b67a509301 /src/server/api/stream/channels/hybrid-timeline.ts
parentRevert "fix: use master branch when build docker image" (diff)
downloadmisskey-53f3b779bf16abcda4f6e026c51384f3b8fbcc62.tar.gz
misskey-53f3b779bf16abcda4f6e026c51384f3b8fbcc62.tar.bz2
misskey-53f3b779bf16abcda4f6e026c51384f3b8fbcc62.zip
refactor: Expand schema (#7772)
* packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation * test * fix * yatta * remove no longer needed "as PackedUser/PackedNote" * clean up * add simple-schema * fix lint * define items in full Schema * revert https://github.com/misskey-dev/misskey/pull/7772#discussion_r706627736 * user packとnote packの型不整合を修正
Diffstat (limited to 'src/server/api/stream/channels/hybrid-timeline.ts')
-rw-r--r--src/server/api/stream/channels/hybrid-timeline.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts
index 5c454764ec..0b28ff616b 100644
--- a/src/server/api/stream/channels/hybrid-timeline.ts
+++ b/src/server/api/stream/channels/hybrid-timeline.ts
@@ -4,7 +4,6 @@ import Channel from '../channel';
import { fetchMeta } from '@/misc/fetch-meta';
import { Notes } from '@/models/index';
import { PackedNote } from '@/models/repositories/note';
-import { PackedUser } from '@/models/repositories/user';
import { checkWordMute } from '@/misc/check-word-mute';
import { isBlockerUserRelated } from '@/misc/is-blocker-user-related';
@@ -31,7 +30,7 @@ export default class extends Channel {
if (!(
(note.channelId == null && this.user!.id === note.userId) ||
(note.channelId == null && this.following.has(note.userId)) ||
- (note.channelId == null && ((note.user as PackedUser).host == null && note.visibility === 'public')) ||
+ (note.channelId == null && (note.user.host == null && note.visibility === 'public')) ||
(note.channelId != null && this.followingChannels.has(note.channelId))
)) return;
@@ -60,7 +59,7 @@ export default class extends Channel {
// 関係ない返信は除外
if (note.reply) {
- const reply = note.reply as PackedNote;
+ const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}