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)
8080 when Line ::Bot ::Event ::VideoPlayComplete
8181 reply_text ( event , "[VIDEOPLAYCOMPLETE]\n #{ JSON . generate ( event [ 'videoPlayComplete' ] ) } " )
8282
83+ when Line ::Bot ::Event ::Unsend
84+ handle_unsend ( event )
85+
8386 else
8487 reply_text ( event , "Unknown event type: #{ event } " )
8588 end
@@ -616,3 +619,19 @@ def handle_location(event)
616619 longitude : message [ 'longitude' ]
617620 } )
618621end
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