|
@@ -116,16 +116,6 @@ type Message struct {
|
|
ChannelID string `json:"channel_id"`
|
|
ChannelID string `json:"channel_id"`
|
|
}
|
|
}
|
|
|
|
|
|
-// ContentWithMentionsReplaced will replace all @<id> mentions with the
|
|
|
|
-// username of the mention.
|
|
|
|
-func (m *Message) ContentWithMentionsReplaced() string {
|
|
|
|
- content := m.Content
|
|
|
|
- for _, user := range m.Mentions {
|
|
|
|
- content = strings.Replace(content, fmt.Sprintf("<@%s>", user.ID), fmt.Sprintf("@%s", user.Username), -1)
|
|
|
|
- }
|
|
|
|
- return content
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// An Attachment stores data for message attachments.
|
|
// An Attachment stores data for message attachments.
|
|
type Attachment struct { //TODO figure this out
|
|
type Attachment struct { //TODO figure this out
|
|
}
|
|
}
|