summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-05-06 08:06:34 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-06 08:06:34 -0400
commitd75cb0294896e0e45f280cbccde8581376d501ce (patch)
tree0d82a1d959945aa2a2e73633233d9c681212f209 /api/channel.go
parent4b2843ee9d513a6b464e1e581e9cee8baaaa4317 (diff)
downloadchat-d75cb0294896e0e45f280cbccde8581376d501ce.tar.gz
chat-d75cb0294896e0e45f280cbccde8581376d501ce.tar.bz2
chat-d75cb0294896e0e45f280cbccde8581376d501ce.zip
Multiple cross-team functionality fixes (#2902)
Diffstat (limited to 'api/channel.go')
-rw-r--r--api/channel.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/api/channel.go b/api/channel.go
index b034e94ba..7cfc22833 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -146,7 +146,11 @@ func CreateDirectChannel(userId string, otherUserId string) (*model.Channel, *mo
}
if result := <-Srv.Store.Channel().SaveDirectChannel(channel, cm1, cm2); result.Err != nil {
- return nil, result.Err
+ if result.Err.Id == store.CHANNEL_EXISTS_ERROR {
+ return result.Data.(*model.Channel), nil
+ } else {
+ return nil, result.Err
+ }
} else {
return result.Data.(*model.Channel), nil
}