File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ export type EventBase = {
78
78
* Source user, group, or room object with information about the source of the event.
79
79
*/
80
80
source : EventSource ;
81
+ /**
82
+ * Webhook Event ID, an ID that uniquely identifies a webhook event
83
+ */
84
+ webhookEventId : string ;
85
+ /**
86
+ * Whether the webhook event is a redelivered one or not
87
+ */
88
+ deliveryContext : DeliveryContext ;
81
89
} ;
82
90
83
91
export type EventSource = User | Group | Room ;
@@ -110,6 +118,8 @@ export type Room = {
110
118
userId ?: string ;
111
119
} ;
112
120
121
+ export type DeliveryContext = { isRedelivery : boolean } ;
122
+
113
123
export type ReplyableEvent = EventBase & { replyToken : string } ;
114
124
115
125
/**
Original file line number Diff line number Diff line change @@ -26,12 +26,16 @@ describe("middleware", () => {
26
26
groupId : "test_group_id" ,
27
27
type : "group" ,
28
28
} ,
29
+ webhookEventId : "test_webhook_event_id" ,
30
+ deliveryContext : {
31
+ isRedelivery : false ,
32
+ } ,
29
33
timestamp : 0 ,
30
34
mode : "active" ,
31
35
type : "message" ,
32
36
} ;
33
37
const webhookSignature = {
34
- "X-Line-Signature" : "GzU7H3qOXDzDD6cNcS/9otLzlLFxnYYriz62rNu5BDE =" ,
38
+ "X-Line-Signature" : "Ey7AjSuSI2GfTDQHICAiRLLJ+GSMseISNYaQ6qXSjrU =" ,
35
39
} ;
36
40
37
41
const http = ( headers : any = { ...webhookSignature } ) =>
You can’t perform that action at this time.
0 commit comments