Skip to content

Commit

Permalink
feat: create SanitizeMessage function
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Sep 17, 2023
1 parent 6e09b44 commit 8b4290c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions messages/message.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package messages

import "github.com/allancapistrano/tangle-client-go/utils"

type Message struct {
Index string `json:"index"`
Content string `json:"content"`
}

// Sanitizes a message.
func SanitizeMessage(message *Message) {
message.Content = utils.SanitizeString(message.Content)
message.Index = utils.SanitizeString(message.Index)
}

0 comments on commit 8b4290c

Please sign in to comment.