diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2020-01-09 14:37:48 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2020-01-09 14:37:48 +0900 |
| commit | 0f25c744150046245e38f69449524a37d850b473 (patch) | |
| tree | 1db1deee6463752ab28cab653b2b4169b2bb3ba3 /src/models | |
| parent | Add GitHub Actions (#5522) (diff) | |
| download | misskey-0f25c744150046245e38f69449524a37d850b473.tar.gz misskey-0f25c744150046245e38f69449524a37d850b473.tar.bz2 misskey-0f25c744150046245e38f69449524a37d850b473.zip | |
カスタム絵文字リアクションでないものは絵文字クエリをしないように (#5693)
* カスタム絵文字リアクションの絵文字がNoteに添付されないのを修正
* ねんのため
* 記述順
* カスタム絵文字リアクションでないものは絵文字クエリをしないように
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/repositories/note.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index bf5ebfdbfe..9c01bf84d5 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -139,9 +139,11 @@ export class NoteRepository extends Repository<Note> { }); } + reactionNames = reactionNames?.filter(x => x.match(/^:[^:]+:$/)).map(x => x.replace(/:/g, '')); + if (reactionNames?.length > 0) { where.push({ - name: In(reactionNames.map(x => x.replace(/:/g, ''))), + name: In(reactionNames), host: null }); } |