From 5d0b98677d050fa42143f6e5dbf94eb207127194 Mon Sep 17 00:00:00 2001 From: zefie Date: Fri, 14 Oct 2022 00:18:46 -0400 Subject: [PATCH] fix usenet search for `*` --- zefie_wtvp_minisrv/includes/WTVNews.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zefie_wtvp_minisrv/includes/WTVNews.js b/zefie_wtvp_minisrv/includes/WTVNews.js index a8010be9..8d656d79 100644 --- a/zefie_wtvp_minisrv/includes/WTVNews.js +++ b/zefie_wtvp_minisrv/includes/WTVNews.js @@ -99,14 +99,14 @@ class WTVNews { listGroups(search = null) { // list of groups on the server return new Promise((resolve, reject) => { - console.log('listGroups search', search) + if (search === "*") search = null; if (!search) { this.client.list().then((data) => { console.log('listGroups data', data) resolve(this.processGroupList(data)); }).catch((e) => { console.error(" * WTVNews Error:", "Command: listGroups (all)", e); - reject(`No such group ${group}`); + reject(e); }); } else { this.client.listNewsgroups('*' + search + '*').then((data) => { @@ -114,7 +114,7 @@ class WTVNews { resolve(this.processGroupList(data)); }).catch((e) => { console.error(" * WTVNews Error:", "Command: listGroups (all)", e); - reject(`No such group ${group}`); + reject(e); }); } })