File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ def reply_content(event, messages)
80
80
when Line ::Bot ::Event ::VideoPlayComplete
81
81
reply_text ( event , "[VIDEOPLAYCOMPLETE]\n #{ JSON . generate ( event [ 'videoPlayComplete' ] ) } " )
82
82
83
+ when Line ::Bot ::Event ::Unsend
84
+ handle_unsend ( event )
85
+
83
86
else
84
87
reply_text ( event , "Unknown event type: #{ event } " )
85
88
end
@@ -616,3 +619,19 @@ def handle_location(event)
616
619
longitude : message [ 'longitude' ]
617
620
} )
618
621
end
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]\n messageId: #{ event [ 'unsend' ] [ 'messageId' ] } "
636
+ } )
637
+ end
You can’t perform that action at this time.
0 commit comments