Skip to content

Commit

Permalink
[tests] test incoming updates
Browse files Browse the repository at this point in the history
  • Loading branch information
david-lev committed Oct 25, 2023
1 parent 0b86f5c commit 64ed412
Show file tree
Hide file tree
Showing 6 changed files with 1,096 additions and 0 deletions.
94 changes: 94 additions & 0 deletions tests/data/18.0/callback_button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"button": {
"object": "whatsapp_business_account",
"entry": [
{
"id": "5467539754836534",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "972123456789",
"phone_number_id": "1122334455667"
},
"contacts": [
{
"profile": {
"name": "Test Name"
},
"wa_id": "972987654321"
}
],
"messages": [
{
"context": {
"from": "1122334455667",
"id": "wamid.xyzxyz"
},
"from": "972987654321",
"id": "wamid.xyzxyz",
"timestamp": "1698266730",
"type": "interactive",
"interactive": {
"type": "button_reply",
"button_reply": {
"id": "callback_data",
"title": "title"
}
}
}
]
},
"field": "messages"
}
]
}
]
},
"quick_reply": {
"object": "whatsapp_business_account",
"entry": [
{
"id": "5467539754836534",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "972123456789",
"phone_number_id": "1122334455667"
},
"contacts": [
{
"profile": {
"name": "Test Name"
},
"wa_id": "972987654321"
}
],
"messages": [
{
"context": {
"from": "972123456789",
"id": "wamid.xyzxyz=="
},
"from": "972987654321",
"id": "wamid.xsidjw",
"timestamp": "1698269027",
"type": "button",
"button": {
"payload": "callback_data",
"text": "title"
}
}
]
},
"field": "messages"
}
]
}
]
}

}
97 changes: 97 additions & 0 deletions tests/data/18.0/callback_selection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"callback": {
"object": "whatsapp_business_account",
"entry": [
{
"id": "1234567890987654321",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "972123456789",
"phone_number_id": "1122334455667"
},
"contacts": [
{
"profile": {
"name": "Test Name"
},
"wa_id": "972987654321"
}
],
"messages": [
{
"context": {
"from": "1122334455667",
"id": "wamid.xyzxyz"
},
"from": "972987654321",
"id": "wamid.zyzxyz",
"timestamp": "1698266905",
"type": "interactive",
"interactive": {
"type": "list_reply",
"list_reply": {
"id": "callback_data",
"title": "title"
}
}
}
]
},
"field": "messages"
}
]
}
]
},
"description": {
"object": "whatsapp_business_account",
"entry": [
{
"id": "1234567890987654321",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "972123456789",
"phone_number_id": "1122334455667"
},
"contacts": [
{
"profile": {
"name": "Test Name"
},
"wa_id": "972987654321"
}
],
"messages": [
{
"context": {
"from": "1122334455667",
"id": "wamid.xyzxyz"
},
"from": "972987654321",
"id": "wamid.zyzxyz",
"timestamp": "1698266905",
"type": "interactive",
"interactive": {
"type": "list_reply",
"list_reply": {
"id": "callback_data",
"title": "title",
"description": "description"
}
}
}
]
},
"field": "messages"
}
]
}
]
}
}
Loading

0 comments on commit 64ed412

Please sign in to comment.