This commit is contained in:
Aslan 2025-12-28 18:06:07 +01:00
parent 05875413f9
commit 00211a604f
3 changed files with 9 additions and 4 deletions

View file

@ -69,7 +69,11 @@ const getUserName = (user: IUser): string => {
return match.replaceAll("@", "");
};
const getUserFromMention = (mention: string): IUser | undefined => {
const getUserFromMention = (mention: string | undefined): IUser | undefined => {
if (!mention) {
return undefined;
}
const regex = /\[\@\S*:aslan2142.space\]/;
const match = mention
.match(regex)