Skip to content

Instantly share code, notes, and snippets.

@moznion
Last active November 17, 2016 04:09
Show Gist options
  • Save moznion/b5b5fde2f157109fab0f5fc3ae96fd7a to your computer and use it in GitHub Desktop.
Save moznion/b5b5fde2f157109fab0f5fc3ae96fd7a to your computer and use it in GitHub Desktop.
diff --git a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php
index 568b51f..7569722 100644
--- a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php
+++ b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php
@@ -46,9 +46,18 @@ class JoinEventHandler implements EventHandler
public function handle()
{
$this->bot->replyText(
$this->joinEvent->getReplyToken(),
- sprintf('Joined %s %s', $this->joinEvent->getType(), $this->joinEvent->getUserId())
+ sprintf('Joined %s %s', $this->joinEvent->getType(), $this->joinEvent->getEventSourceId())
);
}
}
diff --git a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/LeaveEventHandler.php b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/LeaveEventHandler.php
index 90fcc96..d519739 100644
--- a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/LeaveEventHandler.php
+++ b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/LeaveEventHandler.php
@@ -46,9 +46,15 @@ class LeaveEventHandler implements EventHandler
public function handle()
{
- $this->bot->replyText(
- $this->leaveEvent->getReplyToken(),
- sprintf('Leaved %s %s', $this->leaveEvent->getType(), $this->leaveEvent->getUserId())
- );
+ $this->logger->info(sprintf('Leaved %s %s', $this->leaveEvent->getType(), $this->leaveEvent->getEventSourceId));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment