diff --git a/src/snek/static/chat-input.js b/src/snek/static/chat-input.js index cb7fa47..8405e26 100644 --- a/src/snek/static/chat-input.js +++ b/src/snek/static/chat-input.js @@ -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) {