Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[Hangouts] Add interactive cards support #1487

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/google_hangouts_bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ controller.hears('cards', 'message_received', function (bot, message) {
}
});
});

controller.on('card_clicked', function (bot, message) {
bot.reply(message, 'This is a card click');
});
4 changes: 4 additions & 0 deletions lib/GoogleHangoutsBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ function GoogleHangoutsBot(configuration) {
message.type = 'ROOM' === message.space.type ? 'bot_room_leave' : 'bot_dm_leave';
}

if ('CARD_CLICKED' === message.type) {
message.type = message.type.toLowerCase();
}

next();

});
Expand Down