summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-13 13:47:10 +0000
committerenahum <nahumhbl@gmail.com>2017-01-13 10:47:10 -0300
commit6c814c72ec8fc5ec5f17c657d2af8fafa67b1e33 (patch)
treec32177e218ef0fc62ee771e87cd10bbe12d62050 /api/user.go
parent0196137decd24957cb11b3d3875eac54359cada5 (diff)
downloadchat-6c814c72ec8fc5ec5f17c657d2af8fafa67b1e33.tar.gz
chat-6c814c72ec8fc5ec5f17c657d2af8fafa67b1e33.tar.bz2
chat-6c814c72ec8fc5ec5f17c657d2af8fafa67b1e33.zip
PLT-4317: Fix Desktop App platform in sessions list. (#5048)
Incidentally fixes displaying the Linux icon next to sessions on Linux at the same time.
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 760f4faea..966223a5b 100644
--- a/api/user.go
+++ b/api/user.go
@@ -636,6 +636,10 @@ func doLogin(c *Context, w http.ResponseWriter, r *http.Request, user *model.Use
bname = "unknown"
}
+ if strings.Contains(r.UserAgent(), "Mattermost") {
+ bname = "Desktop App"
+ }
+
if bversion == "" {
bversion = "0.0"
}