summaryrefslogtreecommitdiff
path: root/src/server/api/stream/channels
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-11-24 08:31:57 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-11-24 08:31:57 +0900
commitb241967fb98dad3f29ea7d28215166256732a282 (patch)
treebff55945c2c42a5db605c8e5005a61d0f582d538 /src/server/api/stream/channels
parentFix bug (diff)
downloadsharkey-b241967fb98dad3f29ea7d28215166256732a282.tar.gz
sharkey-b241967fb98dad3f29ea7d28215166256732a282.tar.bz2
sharkey-b241967fb98dad3f29ea7d28215166256732a282.zip
Fix: ローカルにフォロワー限定投稿が流れてくる (#5598)
Diffstat (limited to 'src/server/api/stream/channels')
-rw-r--r--src/server/api/stream/channels/local-timeline.ts30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts
index 24cbc0a7bf..e31e5c59cb 100644
--- a/src/server/api/stream/channels/local-timeline.ts
+++ b/src/server/api/stream/channels/local-timeline.ts
@@ -25,29 +25,19 @@ export default class extends Channel {
@autobind
private async onNote(note: PackedNote) {
if ((note.user as PackedUser).host !== null) return;
- if (note.visibility === 'home') return;
+ if (note.visibility !== 'public') return;
- if (['followers', 'specified'].includes(note.visibility)) {
- note = await Notes.pack(note.id, this.user, {
+ // リプライなら再pack
+ if (note.replyId != null) {
+ note.reply = await Notes.pack(note.replyId, this.user, {
+ detail: true
+ });
+ }
+ // Renoteなら再pack
+ if (note.renoteId != null) {
+ note.renote = await Notes.pack(note.renoteId, this.user, {
detail: true
});
-
- if (note.isHidden) {
- return;
- }
- } else {
- // リプライなら再pack
- if (note.replyId != null) {
- note.reply = await Notes.pack(note.replyId, this.user, {
- detail: true
- });
- }
- // Renoteなら再pack
- if (note.renoteId != null) {
- note.renote = await Notes.pack(note.renoteId, this.user, {
- detail: true
- });
- }
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する