Skip to content

Commit

Permalink
fix incorrect data type value of message attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmizumoto authored and Admiral-Piett committed Mar 8, 2023
1 parent 5de5724 commit 8613eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/gosns/gosns.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ func publishSQS(w http.ResponseWriter, req *http.Request,
msg.MessageAttributes = messageAttributes
msg.MD5OfMessageAttributes = common.HashAttributes(messageAttributes)
m, err := extractMessageFromJSON(messageBody, subs.Protocol)
if (err == nil) {
if err == nil {
msg.MessageBody = []byte(m)
} else {
msg.MessageBody = []byte(messageBody)
Expand Down Expand Up @@ -609,7 +609,7 @@ func formatAttributes(values map[string]app.MessageAttributeValue) map[string]ap
attr := make(map[string]app.MsgAttr)
for k, v := range values {
attr[k] = app.MsgAttr{
Type: v.ValueKey,
Type: v.DataType,
Value: v.Value,
}
}
Expand Down

0 comments on commit 8613eb4

Please sign in to comment.