We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47e0eca commit 8f7251bCopy full SHA for 8f7251b
examples/kitchensink/app.rb
@@ -80,6 +80,9 @@ def reply_content(event, messages)
80
when Line::Bot::Event::VideoPlayComplete
81
reply_text(event, "[VIDEOPLAYCOMPLETE]\n#{JSON.generate(event['videoPlayComplete'])}")
82
83
+ when Line::Bot::Event::Unsend
84
+ handle_unsend(event)
85
+
86
else
87
reply_text(event, "Unknown event type: #{event}")
88
end
@@ -616,3 +619,19 @@ def handle_location(event)
616
619
longitude: message['longitude']
617
620
})
618
621
622
623
+def handle_unsend(event)
624
+ source = event['source']
625
+ id = case source['type']
626
+ when 'user'
627
+ source['userId']
628
+ when 'group'
629
+ source['groupId']
630
+ when 'room'
631
+ source['roomId']
632
+ end
633
+ client.push_message(id, {
634
+ type: 'text',
635
+ text: "[UNSEND]\nmessageId: #{event['unsend']['messageId']}"
636
+ })
637
+end
0 commit comments