From e5ffb0059c031aa5cda01a219c44432b3308f240 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Mon, 25 Nov 2019 13:14:19 -0500 Subject: [PATCH] Fix test --- models/msgs.go | 2 +- models/msgs_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/msgs.go b/models/msgs.go index 17d682225..074f9e18d 100644 --- a/models/msgs.go +++ b/models/msgs.go @@ -329,7 +329,7 @@ func NewOutgoingMsg(orgID OrgID, channel *Channel, contactID ContactID, out *flo metadata["templating"] = out.Templating() } if out.Topic() != flows.NilMsgTopic { - metadata["topic"] = out.Topic() + metadata["topic"] = string(out.Topic()) } m.Metadata = null.NewMap(metadata) } diff --git a/models/msgs_test.go b/models/msgs_test.go index 324fa081e..07d596a4f 100644 --- a/models/msgs_test.go +++ b/models/msgs_test.go @@ -91,7 +91,7 @@ func TestMsgs(t *testing.T) { tx, err := db.BeginTxx(ctx, nil) assert.NoError(t, err) - flowMsg := flows.NewMsgOut(tc.URN, assets.NewChannelReference(tc.ChannelUUID, "Test Channel"), tc.Text, tc.Attachments, tc.QuickReplies, nil, flows.NilMsgTopic) + flowMsg := flows.NewMsgOut(tc.URN, assets.NewChannelReference(tc.ChannelUUID, "Test Channel"), tc.Text, tc.Attachments, tc.QuickReplies, nil, tc.Topic) msg, err := NewOutgoingMsg(orgID, tc.Channel, tc.ContactID, flowMsg, now) if err == nil {