Merge remote-tracking branch 'misskey-dev/develop' into io

This commit is contained in:
まっちゃとーにゅ 2024-03-05 15:49:07 +09:00
commit 9e63703d59
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
35 changed files with 1455 additions and 1309 deletions

View file

@ -387,9 +387,10 @@ function getKey(emoji: string | UnicodeEmojiDef | Misskey.entities.EmojiSimple):
}
}
function getDef(emoji: string) {
function getDef(emoji: string): string | Misskey.entities.EmojiSimple | UnicodeEmojiDef | null {
if (emoji.includes(':')) {
return customEmojisMap.get(emoji.replace(/:/g, '')) ?? null;
const name = emoji.replaceAll(':', '');
return customEmojisMap.get(name) ?? null;
} else {
return emoji;
}
@ -399,7 +400,7 @@ function getDef(emoji: string) {
function computeButtonTitle(ev: MouseEvent): void {
const elm = ev.target as HTMLElement;
const emoji = elm.dataset.emoji as string;
elm.title = getEmojiName(emoji) ?? emoji;
elm.title = getEmojiName(emoji);
}
function chosen(emoji: any, ev?: MouseEvent) {