From aefab8e4c5b8a0a513d506bd679795d58e9f8186 Mon Sep 17 00:00:00 2001 From: Rafael Soares Date: Thu, 17 Aug 2023 18:26:58 -0300 Subject: [PATCH] msg catalog tweaks --- core/handlers/msg_catalog_created.go | 1 + core/handlers/msg_catalog_created_test.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/handlers/msg_catalog_created.go b/core/handlers/msg_catalog_created.go index 270f4765d..9c4163361 100644 --- a/core/handlers/msg_catalog_created.go +++ b/core/handlers/msg_catalog_created.go @@ -73,6 +73,7 @@ func handleMsgCatalogCreated(ctx context.Context, rt *runtime.Runtime, tx *sqlx. "header": event.Msg.Header(), "products": event.Msg.Products(), "urn": event.Msg.URN(), + "action": event.Msg.Action(), }).Debug("msg created event") // messages in messaging flows must have urn id set on them, if not, go look it up diff --git a/core/handlers/msg_catalog_created_test.go b/core/handlers/msg_catalog_created_test.go index aeedfe6da..654b4b8ad 100644 --- a/core/handlers/msg_catalog_created_test.go +++ b/core/handlers/msg_catalog_created_test.go @@ -35,18 +35,19 @@ func TestMsgCatalogCreated(t *testing.T) { testdata.Cathy: []flows.Action{ actions.NewSendMsgCatalog( handlers.NewActionUUID(), - "", "Some products", "", + "", "Some products", "", "View Products", []string{ "9f526c6f-b2cb-4457-8048-a7f1dc101e50", "eb2305cc-bf39-43ad-a069-bbbfb6401acc", }, + true, ), }, testdata.George: []flows.Action{ actions.NewSendMsgCatalog( handlers.NewActionUUID(), - "Select The Service", "", "", + "Select The Service", "", "", "View Products", []string{ "cbd9ba07-7156-406e-8006-5b697d18d091", "63157bd2-6f94-4dbb-b394-ea4eb07ce156", @@ -55,7 +56,7 @@ func TestMsgCatalogCreated(t *testing.T) { ), }, testdata.Bob: []flows.Action{ - actions.NewSendMsgCatalog(handlers.NewActionUUID(), "No URNs", "", "", nil, false), + actions.NewSendMsgCatalog(handlers.NewActionUUID(), "No URNs", "", "", "View Products", nil, false), }, }, Msgs: handlers.ContactMsgMap{