Fix channel name cleaning for fully non-ascii names
parent
c994ae1767
commit
3974d1d0ca
2
index.js
2
index.js
|
@ -230,7 +230,7 @@ function getModmailChannel(user, allowCreate = true) {
|
|||
} else {
|
||||
if (! allowCreate) return Promise.resolve(null);
|
||||
|
||||
const cleanName = user.username.replace(/[^a-zA-Z0-9]/ig, '').toLowerCase().trim();
|
||||
let cleanName = user.username.replace(/[^a-zA-Z0-9]/ig, '').toLowerCase().trim();
|
||||
if (cleanName === '') cleanName = 'unknown';
|
||||
|
||||
// If one is not found, create and cache it
|
||||
|
|
Loading…
Reference in New Issue