|
|
|
@ -3,7 +3,7 @@ import { ChatMemberRole, MessageType } from "../enums";
@@ -3,7 +3,7 @@ import { ChatMemberRole, MessageType } from "../enums";
|
|
|
|
|
const regexToMatch = /@\[([^[]*)]\(([^(^)]*)\)/g; |
|
|
|
|
const parseMentionsMessage = (message: string, regex: RegExp): string => { |
|
|
|
|
const subst = ` @$1 `; |
|
|
|
|
const result = message.replace(regex, subst); |
|
|
|
|
const result = message?.replace(regex, subst); |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
}; |
|
|
|
@ -53,7 +53,7 @@ export const createFullName = (
@@ -53,7 +53,7 @@ export const createFullName = (
|
|
|
|
|
firstName?: string, |
|
|
|
|
middleName?: string, |
|
|
|
|
lastName?: string |
|
|
|
|
) => [lastName, firstName, middleName].filter(it => it).join(" "); |
|
|
|
|
) => [lastName, firstName, middleName].filter((it) => it).join(" "); |
|
|
|
|
|
|
|
|
|
export const createFullRolePreviewText = (role: ChatMemberRole) => { |
|
|
|
|
switch (role) { |
|
|
|
|