diff --git a/pkg/sdk/go/message.go b/pkg/sdk/go/message.go index 45b4f3778d2..aca7b72f057 100644 --- a/pkg/sdk/go/message.go +++ b/pkg/sdk/go/message.go @@ -22,7 +22,7 @@ func (sdk mfSDK) SendMessage(chanName, msg, key string) errors.SDKError { subtopicPart = fmt.Sprintf("/%s", strings.Replace(chanNameParts[1], ".", "/", -1)) } - url := fmt.Sprintf("%s/channels/%s/messages/%s", sdk.httpAdapterURL, chanID, subtopicPart) + url := fmt.Sprintf("%s/channels/%s/messages%s", sdk.httpAdapterURL, chanID, subtopicPart) _, _, err := sdk.processRequest(http.MethodPost, url, ThingPrefix+key, string(CTJSON), []byte(msg), http.StatusAccepted) @@ -34,7 +34,7 @@ func (sdk mfSDK) ReadMessages(chanName, token string) (MessagesPage, errors.SDKE chanID := chanNameParts[0] subtopicPart := "" if len(chanNameParts) == channelParts { - subtopicPart = fmt.Sprintf("?subtopic=%s", strings.Replace(chanNameParts[1], ".", "/", -1)) + subtopicPart = fmt.Sprintf("?subtopic=%s", chanNameParts[1]) } url := fmt.Sprintf("%s/channels/%s/messages%s", sdk.readerURL, chanID, subtopicPart)