summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-12-04 08:09:52 -0500
committerJoramWilander <jwawilander@gmail.com>2015-12-04 08:09:52 -0500
commit9d804853f3c23bf528f0b8cb07034b208b97fa76 (patch)
tree55c55147f7a0495e59907009e29d851f8c54c188 /api/post.go
parent0466d0fde9fb0bc9452fca531e96490ae274eb55 (diff)
downloadchat-9d804853f3c23bf528f0b8cb07034b208b97fa76.tar.gz
chat-9d804853f3c23bf528f0b8cb07034b208b97fa76.tar.bz2
chat-9d804853f3c23bf528f0b8cb07034b208b97fa76.zip
Remove <> link replacement
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/api/post.go b/api/post.go
index 6785a8c44..40c5efe8c 100644
--- a/api/post.go
+++ b/api/post.go
@@ -153,9 +153,6 @@ func CreateWebhookPost(c *Context, channelId, text, overrideUsername, overrideIc
linkWithTextRegex := regexp.MustCompile(`<([^<\|]+)\|([^>]+)>`)
text = linkWithTextRegex.ReplaceAllString(text, "[${2}](${1})")
- linkRegex := regexp.MustCompile(`<\s*(\S*)\s*>`)
- text = linkRegex.ReplaceAllString(text, "${1}")
-
post := &model.Post{UserId: c.Session.UserId, ChannelId: channelId, Message: text, Type: postType}
post.AddProp("from_webhook", "true")
@@ -185,7 +182,6 @@ func CreateWebhookPost(c *Context, channelId, text, overrideUsername, overrideIc
if _, ok := attachment["text"]; ok {
aText := attachment["text"].(string)
aText = linkWithTextRegex.ReplaceAllString(aText, "[${2}](${1})")
- aText = linkRegex.ReplaceAllString(aText, "${1}")
attachment["text"] = aText
list[i] = attachment
}