Compacted code

This commit is contained in:
BordedDev 2025-06-01 20:53:02 +02:00
parent 20f817506f
commit f7e1708039
No known key found for this signature in database
GPG Key ID: C5F495EAE56673BF

View File

@ -67,13 +67,7 @@ class ChatInputComponent extends HTMLElement {
}
getAuthors() {
let authors = []
for (let i = 0; i < this.users.length; i++) {
authors.push(this.users[i].username)
authors.push(this.users[i].nick)
}
return authors
return this.users.flatMap((user) => [user.username, user.nick])
}
extractMentions(text) {