mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
fix user agent for desktop app (#6612)
This commit is contained in:
committed by
Joram Wilander
parent
dc5e7b805c
commit
8db20efd46
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user