fix double dot breaking everything

This commit is contained in:
zefie
2022-10-13 02:53:51 -04:00
parent f6db75fca2
commit 7e12686961

View File

@@ -247,9 +247,11 @@ class WTVNews {
messageid = data; messageid = data;
resolve(data); resolve(data);
}).catch((e) => { }).catch((e) => {
console.log('Error getting articleID',article, e)
reject(e) reject(e)
}); });
}).catch((e) => { }).catch((e) => {
console.log('Error selecting group', e)
reject(e) reject(e)
}); });
})); }));
@@ -273,12 +275,9 @@ class WTVNews {
articleData.headers.References = messageid; articleData.headers.References = messageid;
articleData.headers['In-Reply-To'] = messageid; articleData.headers['In-Reply-To'] = messageid;
} }
if (msg_body) articleData.body = msg_body.split("\n");
else articleData.body = [];
if (msg_body) {
articleData.body = msg_body.split("\n");
} else {
articleData.body = [];
}
response.send(articleData).then((response) => { response.send(articleData).then((response) => {
this.client.quit(); this.client.quit();
if (response.code !== 240) { if (response.code !== 240) {
@@ -290,8 +289,7 @@ class WTVNews {
this.client.quit(); this.client.quit();
reject("Could not send post. Server returned error " + response.code); reject("Could not send post. Server returned error " + response.code);
}); });
} } else {
else {
this.client.quit(); this.client.quit();
console.log('usenet upstream uncaught error', e); console.log('usenet upstream uncaught error', e);
reject("Could not send post. Server returned unknown error"); reject("Could not send post. Server returned unknown error");
@@ -310,6 +308,7 @@ class WTVNews {
this.client.article(articleID).then((data) => { this.client.article(articleID).then((data) => {
resolve(data.article.messageId); resolve(data.article.messageId);
}).catch((e) => { }).catch((e) => {
console.log("error getting messageID from article", articleID, e)
reject(e); reject(e);
}); });
}); });