From fe448d07d464ded570a588d39dc1b8eb56999f0a Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 7 Apr 2021 22:17:28 -0700 Subject: [PATCH] Better naming scheme for when we start requesting voice channels after this --- freechat-client/src/channels.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/freechat-client/src/channels.js b/freechat-client/src/channels.js index 3f1bff7..386701b 100644 --- a/freechat-client/src/channels.js +++ b/freechat-client/src/channels.js @@ -68,12 +68,15 @@ exports.list = async function(server, user) { try { const url = `${server['protocol']}://${server['hostname']}:${server['port']}/channels/list` - const response = await got(url, { - searchParams: { id: user['id'], jwt: user['jwt'], kind: ANY_CHANNEL }, + const text_channel_response = await got(url, { + searchParams: { id: user['id'], jwt: user['jwt'], kind: TEXT_KIND }, responseType: 'json' }) + let text_channels = text_channel_response.body['channels'] + console.log('text: ', text_channels) - const channels = response.body['channels'] + + const channels = text_channels for(const channel of channels) {