From 89f4e2d5bafe6455c89e9b2f09aee4d479f87229 Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Sat, 18 Dec 2021 13:04:18 -0700 Subject: [PATCH] Include protocol in canonical ID return --- gateway/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway/gateway.go b/gateway/gateway.go index 7da4defa..85f5a187 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -66,7 +66,7 @@ func New(rootLogger *logrus.Logger, cfg *config.Gateway, r *Router) *Gateway { func (gw *Gateway) FindCanonicalMsgID(protocol string, mID string) string { ID := protocol + " " + mID if gw.Messages.Contains(ID) { - return mID + return ID } // If not keyed, iterate through cache for downstream, and infer upstream. @@ -75,7 +75,7 @@ func (gw *Gateway) FindCanonicalMsgID(protocol string, mID string) string { ids := v.([]*BrMsgID) for _, downstreamMsgObj := range ids { if ID == downstreamMsgObj.ID { - return strings.Replace(mid.(string), protocol+" ", "", 1) + return mid.(string) } } }