Skip to content

Commit

Permalink
Merge pull request #5 from a-company-jp/test-join
Browse files Browse the repository at this point in the history
💩 dummy code for follow event
  • Loading branch information
Shion1305 authored Oct 11, 2024
2 parents 58cf40a + 4e306fc commit 639a911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/handler/line.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (l *LINEWebhookHandler) Handle(c *gin.Context) {
// delivery: When a message is successfully delivered to a user. You can't reply to this event.
case "follow":
// follow: When a user adds your LINE Official Account as a friend, or unblocks your LINE Official Account. You can reply to this event.
l.HandleFollowEvent(event.(*webhook.FollowEvent))
case "leave":
// leave: When a user deletes your LINE Official Account or your LINE Official Account leaves, from a group chat or multi-person chat.
case "memberJoined":
Expand All @@ -67,7 +68,8 @@ func (l *LINEWebhookHandler) Handle(c *gin.Context) {
}
}

func (l *LINEWebhookHandler) HandleJoinEvent(event *webhook.FollowEvent) {
func (l *LINEWebhookHandler) HandleFollowEvent(event *webhook.FollowEvent) {
l.lineBotSvc.ReplyTextMessage(event.ReplyToken, "Thank you for adding me as a friend!")
}

func (l *LINEWebhookHandler) HandleMessageEvent(event *webhook.MessageEvent) {
Expand Down

0 comments on commit 639a911

Please sign in to comment.