changed http code on "no messages"
This commit is contained in:
parent
f227016148
commit
703b11c79c
@ -188,14 +188,13 @@ function cmd_msg(input) {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.status === 200)
|
if (res.status === 200)
|
||||||
return res.json();
|
return res.json();
|
||||||
else if (res.status === 100)
|
else if (res.status === 204)
|
||||||
return;
|
return;
|
||||||
cmd_exit();
|
cmd_exit();
|
||||||
outputText({output: "Error occurred while fetching messages!"});
|
outputText({output: "Error occurred while fetching messages!"});
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res === undefined)
|
if (res === undefined)
|
||||||
return;
|
return;
|
||||||
console.log(res);
|
|
||||||
for (const user in res)
|
for (const user in res)
|
||||||
for (const msg of res[user])
|
for (const msg of res[user])
|
||||||
outputText({output: msg});
|
outputText({output: msg});
|
||||||
|
Loading…
Reference in New Issue
Block a user