From 98186e5018bbc604796d4f9762c93f4f75e2913f Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Mon, 21 Sep 2015 14:22:23 -0400 Subject: Implement incoming webhooks. --- api/channel.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'api/channel.go') 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 = "" -- cgit v1.2.3-1-g7c22