Skip to content

Commit

Permalink
fix getArticle() can't get correct article if search conditions are s…
Browse files Browse the repository at this point in the history
…et. (#7)
  • Loading branch information
JosephT5566 authored and kevinptt0323 committed Sep 6, 2019
1 parent eecf6c9 commit fe559ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sites/ptt/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ class Bot extends EventEmitter {

async getArticle(boardname, sn) {
await this.enterBoard(boardname);
if (this.isSearchConditionSet()){
let searchString = this.searchCondition.conditions.map(condition => condition.toSearchString()).join(key.Enter);
await this.send(`${searchString}${key.Enter}`);
}
const { getLine } = this;

await this.send(`${sn}${key.Enter}${key.Enter}`);
Expand Down

0 comments on commit fe559ee

Please # to comment.