Skip to content

Commit

Permalink
keeping card index as string inline with components indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhnewatiya-plivo committed Jun 20, 2024
1 parent b17745f commit b4070b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func main() {
"type": "carousel",
"cards": [
{
"card_index": 0,
"card_index": "0",
"components": [
{
"type": "header",
Expand All @@ -356,7 +356,7 @@ func main() {
{
"type": "button",
"sub_type": "quick_reply",
"index": 0,
"index": "0",
"parameters": [
{
"type": "payload",
Expand All @@ -367,7 +367,7 @@ func main() {
{
"type": "button",
"sub_type": "url",
"index": 1,
"index": "1",
"parameters": [
{
"type": "text",
Expand All @@ -378,7 +378,7 @@ func main() {
]
},
{
"card_index": 1,
"card_index": "1",
"components": [
{
"type": "header",
Expand All @@ -405,7 +405,7 @@ func main() {
{
"type": "button",
"sub_type": "quick_reply",
"index": 0,
"index": "0",
"parameters": [
{
"type": "payload",
Expand All @@ -416,7 +416,7 @@ func main() {
{
"type": "button",
"sub_type": "url",
"index": 1,
"index": "1",
"parameters": [
{
"type": "text",
Expand Down
2 changes: 1 addition & 1 deletion messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ type Component struct {
}

type Card struct {
CardIndex int `mapstructure:"card_index" json:"card_index,omitempty"`
CardIndex string `mapstructure:"card_index" json:"card_index,omitempty"`
Components []Component `mapstructure:"components" json:"components,omitempty"`
}

Expand Down

0 comments on commit b4070b3

Please sign in to comment.