Skip to content

Commit

Permalink
Stylistic fixes to PR #3
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroCB committed Oct 21, 2017
1 parent ab76d9d commit 81df298
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function main(api) {
} else {
// Search for the group specified in the message
const search = line.substring(0, terminator);
//Beginning of list function. Use: list:(number) Lists the latest (number) friends and the most recent message sent or recieved in the chat.
// Beginning of list function. Use: list:(number) Lists the latest (number) friends and the most recent message sent or recieved in the chat.
if (search == "list") {
const amount = line.substring(terminator + 1);
api.getThreadList(0, amount, "inbox", (err, threads) => {
Expand All @@ -131,20 +131,18 @@ function main(api) {
const id = threads[i].threadID;
api.getThreadInfo(id, (err, info) => {
api.getThreadHistory(id, 1, undefined, (err, history) => {
console.log(colored(info.name, "fggreen"))
for (let i = 0; i < history.length; i++)
console.log(colored(info.name, "fggreen"));
for (let i = 0; i < history.length; i++) {
console.log(`${colored(history[i].senderName, "fgblue")}: ${history[i].body}`);
}
)
}
});
});
}
} else {
callback(err);
}
});
}
//end of List function.
else if (search == "load") {
} else if (search == "load") {
const search = line.substring(terminator + 1);
getGroup(search, (err, group) => {
if (!err) {
Expand Down

0 comments on commit 81df298

Please sign in to comment.