From 3c43b9dbbabd1713da0d9e4f9526a1f14687049c Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Fri, 15 Sep 2023 22:50:05 -0400 Subject: [PATCH] fix: sort viewers (#1068) --- functions/src/chat-status.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/src/chat-status.ts b/functions/src/chat-status.ts index 260a748bd..bddde9f28 100644 --- a/functions/src/chat-status.ts +++ b/functions/src/chat-status.ts @@ -259,6 +259,7 @@ export async function twitchGetChatters( !mods.some((m) => m.user_id == c.user_id) && !vips.some((v) => v.user_id == c.user_id) ); + viewers.sort((a, b) => a.user_name.localeCompare(b.user_name)); // for backwards compatibility, return the list of usernames as strings. // and return the full profile as Data. return {