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) {