Fix targetting multi user

This commit is contained in:
2025-04-11 07:22:24 -04:00
parent 5f750b0666
commit 73149b8d6d
3 changed files with 104 additions and 22 deletions

View File

@@ -14,9 +14,15 @@ function extractUserId(input) {
}
function processUserInput(input) {
return input
.split(',')
.map(part => part.trim())
// First try to split by commas
let parts = input.split(',').map(part => part.trim()).filter(part => part !== '');
// If we only have one part, try splitting by spaces
if (parts.length === 1) {
parts = input.split(/\s+/).filter(part => part !== '');
}
return parts
.map(part => extractUserId(part))
.filter(id => id !== null);
}