Skip to content

Commit

Permalink
chore: sanitizing the message and removing Message type
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Sep 17, 2023
1 parent 8b4290c commit 51b5698
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions messages/getAllMessagesByIndex.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import (
iotago "github.com/iotaledger/iota.go/v2"
)

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

// Get all messages available on the node by a given index.
func GetAllMessagesByIndex(nodeUrl string, index string) ([]Message, error) {
node := iotago.NewNodeHTTPAPIClient(nodeUrl)
Expand Down Expand Up @@ -53,6 +48,8 @@ func GetAllMessagesByIndex(nodeUrl string, index string) ([]Message, error) {
}
}

SanitizeMessage(&message)

messages = append(messages, message)
}
} else {
Expand Down

0 comments on commit 51b5698

Please sign in to comment.