Fix #449: Remove the constraint for custom emojis shortnames to have ":" at the beginning and at the end.
This commit is contained in:
@ -201,7 +201,7 @@ export class ChannelDetailsService {
|
||||
propertiesError[`emojis.${i}.sn`] = []
|
||||
if (e.sn === '') {
|
||||
propertiesError[`emojis.${i}.sn`].push(ValidationErrorType.Missing)
|
||||
} else if (!/^:[\w-]+:$/.test(e.sn)) {
|
||||
} else if (!/^:?[\w-]+:?$/.test(e.sn)) { // optional ':' at the beggining and at the end
|
||||
propertiesError[`emojis.${i}.sn`].push(ValidationErrorType.WrongFormat)
|
||||
} else if (seen.has(e.sn)) {
|
||||
propertiesError[`emojis.${i}.sn`].push(ValidationErrorType.Duplicate)
|
||||
|
Reference in New Issue
Block a user