Fix #449: Remove the constraint for custom emojis shortnames to have ":" at the beginning and at the end.

This commit is contained in:
John Livingston
2024-06-25 17:12:46 +02:00
parent bd211d777e
commit 934c07e34e
6 changed files with 9 additions and 12 deletions

View File

@ -91,12 +91,6 @@ export function tplChannelEmojis (el: ChannelEmojisElement): TemplateResult {
el.resetValidation(e)
if (el.channelEmojisConfiguration) {
el.channelEmojisConfiguration.emojis.customEmojis = e.detail
// Fixing missing ':' for shortnames:
for (const desc of el.channelEmojisConfiguration.emojis.customEmojis) {
if (desc.sn === '') { continue }
if (!desc.sn.startsWith(':')) { desc.sn = ':' + desc.sn }
if (!desc.sn.endsWith(':')) { desc.sn += ':' }
}
el.requestUpdate('channelEmojisConfiguration')
}
}