From 8db20efd46f40e9c5012b4334341ca7d0e77f702 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 8 Jun 2017 20:59:02 +0900 Subject: fix user agent for desktop app (#6612) --- app/login.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/login.go') diff --git a/app/login.go b/app/login.go index 2528f9367..819d2081a 100644 --- a/app/login.go +++ b/app/login.go @@ -6,6 +6,7 @@ package app import ( "fmt" "net/http" + "strings" "time" "github.com/mattermost/platform/einterfaces" @@ -90,6 +91,10 @@ func DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId bname = "unknown" } + if strings.Contains(r.UserAgent(), "Mattermost") { + bname = "Desktop App" + } + if bversion == "" { bversion = "0.0" } -- cgit v1.2.3-1-g7c22