Skip to content
Snippets Groups Projects
Commit d06d1e86 authored by syuilo's avatar syuilo
Browse files

fix(backend): カスタム絵文字でリアクションできないことがある問題を修正

parent 5c3a4a82
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
- カスタム絵文字関連の改善
* ノートなどに含まれるemojis(populateEmojiの結果)は(プロキシされたURLではなく)オリジナルのURLを指すように
* MFMでx3/x4もしくはscale.x/yが2.5以上に指定されていた場合にはオリジナル品質の絵文字を使用するように
- カスタム絵文字でリアクションできないことがある問題を修正
### Client
-
......
......@@ -44,7 +44,12 @@ export class CustomEmojiService {
memoryCacheLifetime: 1000 * 60 * 3, // 3m
fetcher: () => this.emojisRepository.find({ where: { host: IsNull() } }).then(emojis => new Map(emojis.map(emoji => [emoji.name, emoji]))),
toRedisConverter: (value) => JSON.stringify(Array.from(value.values())),
fromRedisConverter: (value) => new Map(JSON.parse(value).map((x: Emoji) => [x.name, x])), // TODO: Date型の変換
fromRedisConverter: (value) => {
return new Map(JSON.parse(value).map((x) => [x.name, {
...x,
updatedAt: new Date(x.updatedAt),
}]));
},
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment