Skip to content

Commit

Permalink
chore(release): v0.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsprut authored Feb 29, 2020
2 parents ee6d2f9 + 9373fdc commit acf60cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions lib/telegraf.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,16 @@ export class TelegrafService {
}

private setupOnMessage(handlers: Handler[]): void {
const onMessageHandlers = handlers.filter(({ config }) => config.message)
const onMessageHandlers = handlers.filter(
({ config }) => config.message !== undefined
)

onMessageHandlers.forEach(handler => {
this.bot.hears(handler.config.message, this.adoptHandle(handler))
if (handler.config.message) {
this.bot.hears(handler.config.message, this.adoptHandle(handler))
} else {
this.bot.on('message', this.adoptHandle(handler))
}
})
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-telegraf",
"version": "0.7.2",
"version": "0.7.3",
"description": "Telegraf module for Nest framework",
"keywords": [
"nest",
Expand Down

0 comments on commit acf60cc

Please sign in to comment.