Repository: line/line-bot-sdk-go
Pull request #311 (2022-04-28 14:45:59)

add webhook redelivery
#310 

- Add webhookEventId property
- Add deliveryContext property


Patch:
diff --git a/linebot/event.go b/linebot/event.go
index 81da7a2..bc333f7 100644
--- a/linebot/event.go
+++ b/linebot/event.go
@@ -189,6 +189,11 @@ const (
 	StickerResourceTypeNameText       StickerResourceType = "CUSTOM"
 )
 
+// DeliveryContext type
+type DeliveryContext struct {
+	IsRedelivery bool `json:"isRedelivery"`
+}
+
 // Event type
 type Event struct {
 	ReplyToken        string
@@ -206,6 +211,8 @@ type Event struct {
 	Members           []*EventSource
 	Unsend            *Unsend
 	VideoPlayComplete *VideoPlayComplete
+	WebhookEventID    string
+	DeliveryContext   DeliveryContext
 }
 
 type rawEvent struct {
@@ -223,6 +230,8 @@ type rawEvent struct {
 	Things            *rawThingsEvent      `json:"things,omitempty"`
 	Unsend            *Unsend              `json:"unsend,omitempty"`
 	VideoPlayComplete *VideoPlayComplete   `json:"videoPlayComplete,omitempty"`
+	WebhookEventID    string               `json:"webhookEventId"`
+	DeliveryContext   DeliveryContext      `json:"deliveryContext"`
 }
 
 type rawMemberEvent struct {
@@ -299,6 +308,8 @@ func (e *Event) MarshalJSON() ([]byte, error) {
 		Postback:          e.Postback,
 		Unsend:            e.Unsend,
 		VideoPlayComplete: e.VideoPlayComplete,
+		WebhookEventID:    e.WebhookEventID,
+		DeliveryContext:   e.DeliveryContext,
 	}
 	if e.Beacon != nil {
 		raw.Beacon = &rawBeaconEvent{
@@ -423,6 +434,8 @@ func (e *Event) UnmarshalJSON(body []byte) (err error) {
 	e.Mode = rawEvent.Mode
 	e.Timestamp = time.Unix(rawEvent.Timestamp/milliSecPerSec, (rawEvent.Timestamp%milliSecPerSec)*nanoSecPerMilliSec).UTC()
 	e.Source = rawEvent.Source
+	e.WebhookEventID = rawEvent.WebhookEventID
+	e.DeliveryContext = rawEvent.DeliveryContext
 
 	switch rawEvent.Type {
 	case EventTypeMessage:
diff --git a/linebot/raw.go b/linebot/raw.go
index 750e1fd..f542af8 100644
--- a/linebot/raw.go
+++ b/linebot/raw.go
@@ -27,7 +27,7 @@ func (client *Client) NewRawCall(method string, endpoint string) (*RawCall, erro
 		return nil, err
 	}
 	return &RawCall{
-		c: client,
+		c:   client,
 		req: req,
 	}, nil
 }
@@ -39,7 +39,7 @@ func (client *Client) NewRawCallWithBody(method string, endpoint string, body io
 		return nil, err
 	}
 	return &RawCall{
-		c: client,
+		c:   client,
 		req: req,
 	}, nil
 }
@@ -49,7 +49,7 @@ type RawCall struct {
 	c   *Client
 	ctx context.Context
 
-	req         *http.Request
+	req *http.Request
 }
 
 // AddHeader method


Test patch:
diff --git a/linebot/get_ids_test.go b/linebot/get_ids_test.go
index 2ed705e..0c6ba4c 100644
--- a/linebot/get_ids_test.go
+++ b/linebot/get_ids_test.go
@@ -408,11 +408,11 @@ func TestGetGroupMemberIDsScanner(t *testing.T) {
 	}
 
 	testCases := []struct {
-		FirstResponse   *MemberIDsResponse
+		FirstResponse  *MemberIDsResponse
 		SecondResponse *MemberIDsResponse
 	}{
 		{
-			FirstResponse:   res1,
+			FirstResponse:  res1,
 			SecondResponse: res2,
 		},
 		{
@@ -497,11 +497,11 @@ func TestGetRoomMemberIDsScanner(t *testing.T) {
 	}
 
 	testCases := []struct {
-		FirstResponse   *MemberIDsResponse
+		FirstResponse  *MemberIDsResponse
 		SecondResponse *MemberIDsResponse
 	}{
 		{
-			FirstResponse:   res1,
+			FirstResponse:  res1,
 			SecondResponse: res2,
 		},
 		{
diff --git a/linebot/webhook_test.go b/linebot/webhook_test.go
index e2128fd..ed55c1e 100644
--- a/linebot/webhook_test.go
+++ b/linebot/webhook_test.go
@@ -41,6 +41,10 @@ var webhookTestRequestBody = `{
             "source": {
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
+            },
+			"webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
             },
             "message": {
                 "id": "325708",
@@ -58,6 +62,10 @@ var webhookTestRequestBody = `{
                 "groupId": "u206d25c2ea6bd87c17655609a1c37cb8",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": true
+            },
             "message": {
                 "id": "325708",
                 "type": "text",
@@ -74,6 +82,10 @@ var webhookTestRequestBody = `{
                 "groupId": "u206d25c2ea6bd87c17655609a1c37cb8",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "text",
@@ -102,6 +114,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "image"
@@ -116,6 +132,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "type": "image",
                 "id": "354718705033693861",
@@ -138,6 +158,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "type": "video",
                 "id": "325708",
@@ -158,6 +182,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "type": "audio",
                 "id": "325708",
@@ -176,6 +204,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "file",
@@ -192,6 +224,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "location",
@@ -210,6 +246,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "sticker",
@@ -227,6 +267,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "sticker",
@@ -244,6 +288,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "3257088",
                 "type": "sticker",
@@ -261,6 +309,10 @@ var webhookTestRequestBody = `{
             "source": {
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
+            },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
             }
         },
         {
@@ -270,6 +322,10 @@ var webhookTestRequestBody = `{
             "source": {
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
+            },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
             }
         },
         {
@@ -280,6 +336,10 @@ var webhookTestRequestBody = `{
             "source": {
                 "type": "group",
                 "groupId": "cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+            },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
             }
         },
         {
@@ -289,6 +349,10 @@ var webhookTestRequestBody = `{
             "source": {
                 "type": "group",
                 "groupId": "cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+            },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
             }
         },
         {
@@ -300,6 +364,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "postback": {
                 "data": "action=buyItem&itemId=123123&color=red"
             }
@@ -313,6 +381,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "postback": {
                 "data": "action=sel&only=date",
 				"params": {
@@ -329,6 +401,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "postback": {
                 "data": "action=sel&only=time",
 				"params": {
@@ -345,6 +421,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "postback": {
                 "data": "action=sel",
 				"params": {
@@ -361,6 +441,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "postback": {
                 "data": "action=richmenu-changed-to-a",
 								"params": {
@@ -378,6 +462,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "U012345678901234567890123456789ab"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "beacon": {
                 "hwid":"374591320",
                 "type":"enter"
@@ -392,6 +480,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "U012345678901234567890123456789ab"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "beacon": {
                 "hwid":"374591320",
                 "type":"enter",
@@ -407,6 +499,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "U012345678901234567890123456789ab"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "beacon": {
                 "hwid":"374591320",
                 "type":"stay",
@@ -421,6 +517,10 @@ var webhookTestRequestBody = `{
             "userId": "U012345678901234567890123456789ab",
             "type": "user"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "timestamp": 1462629479859,
           "link": {
             "result": "ok",
@@ -436,6 +536,10 @@ var webhookTestRequestBody = `{
             "type": "group",
             "groupId": "C4af498062901234567890123456789ab"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "joined": {
             "members": [
               {
@@ -457,6 +561,10 @@ var webhookTestRequestBody = `{
             "type": "group",
             "groupId": "C4af498062901234567890123456789ab"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "left": {
             "members": [
               {
@@ -478,6 +586,10 @@ var webhookTestRequestBody = `{
             "type": "user",
             "userId": "U91eeaf62d901234567890123456789ab"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "things": {
             "deviceId": "t2c449c9d1...",
             "type": "link"
@@ -491,6 +603,10 @@ var webhookTestRequestBody = `{
             "type": "user",
             "userId": "U91eeaf62d901234567890123456789ab"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "things": {
             "deviceId": "t2c449c9d1...",
             "type": "unlink"
@@ -504,6 +620,10 @@ var webhookTestRequestBody = `{
             "type": "user",
             "userId": "U91eeaf62d901234567890123456789ab"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "things": {
             "deviceId": "t016b8dc6...",
             "type": "scenarioResult",
@@ -531,6 +651,10 @@ var webhookTestRequestBody = `{
             "userId":"U91eeaf62d901234567890123456789ab",
             "type":"user"
           },
+          "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+          "deliveryContext": {
+            "isRedelivery": false
+          },
           "timestamp":1563511218376,
           "things":{
             "deviceId":"t016b8d...",
@@ -557,6 +681,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "text",
@@ -572,6 +700,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "u206d25c2ea6bd87c17655609a1c37cb8"
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "message": {
                 "id": "325708",
                 "type": "text",
@@ -595,6 +727,10 @@ var webhookTestRequestBody = `{
                 "groupId": "Ca56f94637c...",
                 "userId": "U4af4980629..."
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "unsend": {
                 "messageId": "325708"
             }
@@ -608,6 +744,10 @@ var webhookTestRequestBody = `{
                 "type": "user",
                 "userId": "U4af4980629..."
             },
+            "webhookEventId": "01FZ74ASS536FW97EX38NKCZQK",
+            "deliveryContext": {
+                "isRedelivery": false
+            },
             "videoPlayComplete": {
                 "trackingId": "track_id"
             }
@@ -626,6 +766,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &TextMessage{
 			ID:   "325708",
 			Text: "Hello, world",
@@ -641,6 +785,10 @@ var webhookTestWantEvents = []*Event{
 			UserID:  "u206d25c2ea6bd87c17655609a1c37cb8",
 			GroupID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: true,
+		},
 		Message: &TextMessage{
 			ID:   "325708",
 			Text: "Hello, world",
@@ -656,6 +804,10 @@ var webhookTestWantEvents = []*Event{
 			UserID:  "u206d25c2ea6bd87c17655609a1c37cb8",
 			GroupID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &TextMessage{
 			ID:   "325708",
 			Text: "@openProfileUser Hello. @notOpenProfileUser Hello.",
@@ -683,6 +835,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &ImageMessage{
 			ID: "325708",
 		},
@@ -696,6 +852,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &ImageMessage{
 			ID: "354718705033693861",
 			ContentProvider: &ContentProvider{
@@ -717,6 +877,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &VideoMessage{
 			ID: "325708",
 			ContentProvider: &ContentProvider{
@@ -736,6 +900,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &AudioMessage{
 			ID: "325708",
 			ContentProvider: &ContentProvider{
@@ -753,6 +921,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &FileMessage{
 			ID:       "325708",
 			FileName: "file.txt",
@@ -768,6 +940,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &LocationMessage{
 			ID:        "325708",
 			Title:     "hello",
@@ -785,6 +961,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &StickerMessage{
 			ID:                  "325708",
 			PackageID:           "1",
@@ -801,6 +981,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &StickerMessage{
 			ID:                  "325708",
 			PackageID:           "1",
@@ -817,6 +1001,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &StickerMessage{
 			ID:                  "3257088",
 			PackageID:           "20",
@@ -834,6 +1022,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 	},
 	{
 		Type:      EventTypeUnfollow,
@@ -843,6 +1035,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 	},
 	{
 		ReplyToken: "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
@@ -853,6 +1049,10 @@ var webhookTestWantEvents = []*Event{
 			Type:    EventSourceTypeGroup,
 			GroupID: "cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 	},
 	{
 		Type:      EventTypeLeave,
@@ -862,6 +1062,10 @@ var webhookTestWantEvents = []*Event{
 			Type:    EventSourceTypeGroup,
 			GroupID: "cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 	},
 	{
 		ReplyToken: "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
@@ -872,6 +1076,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Postback: &Postback{
 			Data: "action=buyItem&itemId=123123&color=red",
 		},
@@ -885,6 +1093,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Postback: &Postback{
 			Data: "action=sel&only=date",
 			Params: &Params{
@@ -901,6 +1113,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Postback: &Postback{
 			Data: "action=sel&only=time",
 			Params: &Params{
@@ -917,6 +1133,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Postback: &Postback{
 			Data: "action=sel",
 			Params: &Params{
@@ -933,6 +1153,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Postback: &Postback{
 			Data: "action=richmenu-changed-to-a",
 			Params: &Params{
@@ -950,6 +1174,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U012345678901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Beacon: &Beacon{
 			Hwid:          "374591320",
 			Type:          BeaconEventTypeEnter,
@@ -965,6 +1193,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U012345678901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Beacon: &Beacon{
 			Hwid:          "374591320",
 			Type:          BeaconEventTypeEnter,
@@ -980,6 +1212,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U012345678901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Beacon: &Beacon{
 			Hwid:          "374591320",
 			Type:          BeaconEventTypeStay,
@@ -995,6 +1231,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U012345678901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		AccountLink: &AccountLink{
 			Result: AccountLinkResultOK,
 			Nonce:  "xxxxxxxxxxxxxxx",
@@ -1009,6 +1249,10 @@ var webhookTestWantEvents = []*Event{
 			Type:    EventSourceTypeGroup,
 			GroupID: "C4af498062901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Members: []*EventSource{
 			{
 				Type:   EventSourceTypeUser,
@@ -1028,6 +1272,10 @@ var webhookTestWantEvents = []*Event{
 			Type:    EventSourceTypeGroup,
 			GroupID: "C4af498062901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Members: []*EventSource{
 			{
 				Type:   EventSourceTypeUser,
@@ -1047,6 +1295,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U91eeaf62d901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Things: &Things{
 			DeviceID: `t2c449c9d1...`,
 			Type:     `link`,
@@ -1060,6 +1312,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U91eeaf62d901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Things: &Things{
 			DeviceID: `t2c449c9d1...`,
 			Type:     `unlink`,
@@ -1073,6 +1329,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U91eeaf62d901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Things: &Things{
 			DeviceID: "t016b8dc6...",
 			Type:     "scenarioResult",
@@ -1101,6 +1361,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U91eeaf62d901234567890123456789ab",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Things: &Things{
 			DeviceID: "t016b8d...",
 			Type:     "scenarioResult",
@@ -1125,6 +1389,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &TextMessage{
 			ID:   "325708",
 			Text: "Stand by me",
@@ -1139,6 +1407,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "u206d25c2ea6bd87c17655609a1c37cb8",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Message: &TextMessage{
 			ID:   "325708",
 			Text: "Hello, world! (love)",
@@ -1156,6 +1428,10 @@ var webhookTestWantEvents = []*Event{
 			GroupID: "Ca56f94637c...",
 			UserID:  "U4af4980629...",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		Unsend: &Unsend{
 			MessageID: "325708",
 		},
@@ -1169,6 +1445,10 @@ var webhookTestWantEvents = []*Event{
 			Type:   EventSourceTypeUser,
 			UserID: "U4af4980629...",
 		},
+		WebhookEventID: "01FZ74ASS536FW97EX38NKCZQK",
+		DeliveryContext: DeliveryContext{
+			IsRedelivery: false,
+		},
 		VideoPlayComplete: &VideoPlayComplete{
 			TrackingID: "track_id",
 		},