ai
ai copied to clipboard
リアクションの反応が過剰気味
改行を除く全ての文字列で:
で囲ったらリアクション反応してしまう。
https://github.com/syuilo/ai/blob/d5a34144f0159735a5031954d0d6489ce188c66c/src/modules/emoji-react/index.ts#L39
/:([a-zA-Z0-9_\-]+):/g
でも十分な気がします。
反応例: https://misskey.io/notes/8ett9aa32l
:Volte を購入しました。 https:
で反応している
Noteが投稿されたときにemojis
の配列があるので、そこから取り出しても良さそうな気もします。
sorry for English
Regarding matching on http:// accidentally, I altered index.ts with this line
const customEmojis = note.text.match(/:(?!.*http[s]?:\/\/)([^\n:]+?):/g);
Although you indicate that there are other variation that would match in error too.