fix(backend): /emojiにおける拡張子の削除方法を修正 (#12543)

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
Nanaka Hiira 2023-12-03 10:28:35 +09:00 committed by GitHub
parent c68d87538a
commit 2eb86e0619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,8 +119,8 @@ export class ServerService implements OnApplicationShutdown {
return; return;
} }
const name = path.split('@')[0].replace('.webp', ''); const name = path.split('@')[0].replace(/\.webp$/i, '');
const host = path.split('@')[1]?.replace('.webp', ''); const host = path.split('@')[1]?.replace(/\.webp$/i, '');
const emoji = await this.emojisRepository.findOneBy({ const emoji = await this.emojisRepository.findOneBy({
// `@.` is the spec of ReactionService.decodeReaction // `@.` is the spec of ReactionService.decodeReaction