diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-01-20 13:14:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-01-20 13:14:31 +0900 |
| commit | b39d12f01aff8980023398030fbca1be5bf679f5 (patch) | |
| tree | 5f9e45bd517e6c154798665942a72ecfbce8f456 /src | |
| parent | Drop stalk feature (diff) | |
| download | sharkey-b39d12f01aff8980023398030fbca1be5bf679f5.tar.gz sharkey-b39d12f01aff8980023398030fbca1be5bf679f5.tar.bz2 sharkey-b39d12f01aff8980023398030fbca1be5bf679f5.zip | |
関係のない返信がタイムラインに流れる問題を修正
Resolve #1910
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/api/endpoints/notes/hybrid-timeline.ts | 3 | ||||
| -rw-r--r-- | src/server/api/endpoints/notes/local-timeline.ts | 3 | ||||
| -rw-r--r-- | src/services/note/create.ts | 10 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/server/api/endpoints/notes/hybrid-timeline.ts b/src/server/api/endpoints/notes/hybrid-timeline.ts index c05b88a01b..bb10d5e044 100644 --- a/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -168,6 +168,9 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // public only visibility: 'public', + // リプライでない + replyId: null, + // local '_user.host': null }], diff --git a/src/server/api/endpoints/notes/local-timeline.ts b/src/server/api/endpoints/notes/local-timeline.ts index fd624c10e6..f9d7b75314 100644 --- a/src/server/api/endpoints/notes/local-timeline.ts +++ b/src/server/api/endpoints/notes/local-timeline.ts @@ -96,6 +96,9 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // public only visibility: 'public', + // リプライでない + replyId: null, + // local '_user.host': null } as any; diff --git a/src/services/note/create.ts b/src/services/note/create.ts index f8d1c24087..b5e5c4e49c 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -375,11 +375,17 @@ async function publish(user: IUser, note: INote, noteObj: any, reply: INote, ren // Publish note to local and hybrid timeline stream if (note.visibility != 'home') { - publishLocalTimelineStream(noteObj); + // Ignore if it is a reply + if (note.replyId == null) { + publishLocalTimelineStream(noteObj); + } } if (note.visibility == 'public') { - publishHybridTimelineStream(null, noteObj); + // Ignore if it is a reply + if (note.replyId == null) { + publishHybridTimelineStream(null, noteObj); + } } else { // Publish event to myself's stream publishHybridTimelineStream(note.userId, noteObj); |