summaryrefslogtreecommitdiffstats
path: root/model/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/channel.go')
-rw-r--r--model/channel.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/model/channel.go b/model/channel.go
index 7d8edeee7..a7f007960 100644
--- a/model/channel.go
+++ b/model/channel.go
@@ -120,3 +120,11 @@ func (o *Channel) ExtraUpdated() {
func (o *Channel) PreExport() {
}
+
+func GetDMNameFromIds(userId1, userId2 string) string {
+ if userId1 > userId2 {
+ return userId2 + "__" + userId1
+ } else {
+ return userId1 + "__" + userId2
+ }
+}