summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-21 14:22:23 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-21 14:22:23 -0400
commit98186e5018bbc604796d4f9762c93f4f75e2913f (patch)
treeb0a2c8309399b472fb846c5cec7aa46f9162b0f9 /api/channel.go
parent86429c7bd5bc16e3e7c868650e350f6469efeea1 (diff)
downloadchat-98186e5018bbc604796d4f9762c93f4f75e2913f.tar.gz
chat-98186e5018bbc604796d4f9762c93f4f75e2913f.tar.bz2
chat-98186e5018bbc604796d4f9762c93f4f75e2913f.zip
Implement incoming webhooks.
Diffstat (limited to 'api/channel.go')
-rw-r--r--api/channel.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/api/channel.go b/api/channel.go
index 63acaa8d1..896e22793 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -121,11 +121,7 @@ func CreateDirectChannel(c *Context, otherUserId string) (*model.Channel, *model
channel := new(model.Channel)
channel.DisplayName = ""
- if otherUserId > c.Session.UserId {
- channel.Name = c.Session.UserId + "__" + otherUserId
- } else {
- channel.Name = otherUserId + "__" + c.Session.UserId
- }
+ channel.Name = model.GetDMNameFromIds(otherUserId, c.Session.UserId)
channel.TeamId = c.Session.TeamId
channel.Description = ""