File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 21
21
require 'line/bot/event/message'
22
22
require 'line/bot/event/postback'
23
23
require 'line/bot/event/unfollow'
24
+ require 'line/bot/event/unsend'
24
25
require 'line/bot/event/member_joined'
25
26
require 'line/bot/event/member_left'
26
27
require 'line/bot/event/things'
Original file line number Diff line number Diff line change
1
+ # Copyright 2016 LINE
2
+ #
3
+ # LINE Corporation licenses this file to you under the Apache License,
4
+ # version 2.0 (the "License"); you may not use this file except in compliance
5
+ # with the License. You may obtain a copy of the License at:
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+ # License for the specific language governing permissions and limitations
13
+ # under the License.
14
+
15
+ module Line
16
+ module Bot
17
+ module Event
18
+ # Event object for when the user unsends a message in a group or room.
19
+ #
20
+ # No replyToken is generated for this event.
21
+ #
22
+ # https://developers.line.biz/en/reference/messaging-api/#unsend-event
23
+ class Unsend < Base
24
+ end
25
+ end
26
+ end
27
+ end
Original file line number Diff line number Diff line change 272
272
"deviceId": "deviceid4",
273
273
"type": "unsupport"
274
274
}
275
+ },
276
+ {
277
+ "type": "unsend",
278
+ "mode": "active",
279
+ "timestamp": 1462629479859,
280
+ "source": {
281
+ "type": "group",
282
+ "groupId": "Ca56f94637c...",
283
+ "userId": "U4af4980629..."
284
+ },
285
+ "unsend": {
286
+ "messageId": "325708"
287
+ }
275
288
}
276
289
]
277
290
}
@@ -402,6 +415,8 @@ def generate_client
402
415
expect ( events [ 18 ] ) . to be_a ( Line ::Bot ::Event ::Things )
403
416
expect ( events [ 18 ] . type ) . to eq ( Line ::Bot ::Event ::ThingsType ::Unsupport )
404
417
expect ( events [ 18 ] . device_id ) . to eq ( 'deviceid4' )
418
+
419
+ expect ( events [ 19 ] ) . to be_a ( Line ::Bot ::Event ::Unsend )
405
420
end
406
421
407
422
it 'parses unknown event' do
You can’t perform that action at this time.
0 commit comments