Skip to content

Commit

Permalink
fix(schedule): support headless
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 19, 2021
1 parent db4ed6c commit 2a778e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-schedule/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Database.extend('koishi-plugin-mysql', {
const assignees = assignee
? [this.escape(assignee)]
: this.app.bots.map(bot => this.escape(bot.sid))
if (!assignees.length) return []
return this.query(`SELECT * FROM \`schedule\` WHERE \`assignee\` IN (${assignees.join(',')})`)
},
})
Expand Down

0 comments on commit 2a778e4

Please sign in to comment.