fix user agent for desktop app (#6612)

This commit is contained in:
Saturnino Abril
2017-06-08 20:59:02 +09:00
committed by Joram Wilander
parent dc5e7b805c
commit 8db20efd46

View File

@@ -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"
}