Skip to content

Commit

Permalink
fix: Fix greetings dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
yangeorget committed Mar 1, 2018
1 parent cbbcefe commit de03b2e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
const { TextDialog } = require('botfuel-dialog');

class GreetingsDialog extends TextDialog {
async dialogWillDisplay(userId) {
async dialogWillDisplay(userMessage) {
const userId = userMessage.user;
const greetings = (await this.brain.userGet(userId, 'greetings')) || { greeted: false };
if (!greetings.greeted) {
await this.brain.userSet(userId, 'greetings', { greeted: true });
Expand Down

0 comments on commit de03b2e

Please sign in to comment.