Skip to content

Commit

Permalink
Merge pull request #36 from boybundit/develop
Browse files Browse the repository at this point in the history
Fix leave demo
  • Loading branch information
boybundit committed Jul 20, 2019
2 parents cce4669 + 03c5a3c commit 3da40f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions examples/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,21 @@ bot.on('unfollow', function (event) {
});

bot.on('join', function (event) {
event.reply('join: ' + event.source.groupId);
if(event.source.groupId) {
event.reply('join group: ' + event.source.groupId);
}
if(event.source.roomId) {
event.reply('join room: ' + event.source.roomId);
}
});

bot.on('leave', function (event) {
event.reply('leave: ' + event.source.groupId);
if(event.source.groupId) {
console.log('leave group: ' + event.source.groupId);
}
if(event.source.roomId) {
console.log('leave room: ' + event.source.roomId);
}
});

bot.on('memberJoined', function (event) {
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": "linebot",
"version": "1.5.2",
"version": "1.5.3",
"description": "Node.js SDK for the LINE Messaging API",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 3da40f4

Please sign in to comment.