diff --git a/dist/com.mattermost.gameStatusUpdate-0.2.11.tar.gz b/dist/com.mattermost.gameStatusUpdate-0.2.11.tar.gz index 6ec434b..df8a1e9 100644 Binary files a/dist/com.mattermost.gameStatusUpdate-0.2.11.tar.gz and b/dist/com.mattermost.gameStatusUpdate-0.2.11.tar.gz differ diff --git a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-amd64 b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-amd64 index 1e36151..39a7342 100755 Binary files a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-amd64 and b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-amd64 differ diff --git a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-arm64 b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-arm64 index c43a591..c15cad5 100755 Binary files a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-arm64 and b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-darwin-arm64 differ diff --git a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-amd64 b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-amd64 index 61c22d0..829faa0 100755 Binary files a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-amd64 and b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-amd64 differ diff --git a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-arm64 b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-arm64 index 7c43926..b0d1377 100755 Binary files a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-arm64 and b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-linux-arm64 differ diff --git a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-windows-amd64.exe b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-windows-amd64.exe index 1efe135..b417312 100755 Binary files a/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-windows-amd64.exe and b/dist/com.mattermost.gameStatusUpdate/server/dist/plugin-windows-amd64.exe differ diff --git a/server/dist/plugin-darwin-amd64 b/server/dist/plugin-darwin-amd64 index 1e36151..39a7342 100755 Binary files a/server/dist/plugin-darwin-amd64 and b/server/dist/plugin-darwin-amd64 differ diff --git a/server/dist/plugin-darwin-arm64 b/server/dist/plugin-darwin-arm64 index c43a591..c15cad5 100755 Binary files a/server/dist/plugin-darwin-arm64 and b/server/dist/plugin-darwin-arm64 differ diff --git a/server/dist/plugin-linux-amd64 b/server/dist/plugin-linux-amd64 index 61c22d0..829faa0 100755 Binary files a/server/dist/plugin-linux-amd64 and b/server/dist/plugin-linux-amd64 differ diff --git a/server/dist/plugin-linux-arm64 b/server/dist/plugin-linux-arm64 index 7c43926..b0d1377 100755 Binary files a/server/dist/plugin-linux-arm64 and b/server/dist/plugin-linux-arm64 differ diff --git a/server/dist/plugin-windows-amd64.exe b/server/dist/plugin-windows-amd64.exe index 1efe135..b417312 100755 Binary files a/server/dist/plugin-windows-amd64.exe and b/server/dist/plugin-windows-amd64.exe differ diff --git a/server/router.go b/server/router.go index 3696828..77ff996 100644 --- a/server/router.go +++ b/server/router.go @@ -1,42 +1,9 @@ package main import ( - "context" - "encoding/json" - "strings" - "github.com/mattermost/mattermost/server/public/model" - "github.com/pkg/errors" ) -// HandleProcessList handles the incoming process list from the desktop app. -func (p *Plugin) HandleProcessList(ctx context.Context, requestData []byte) error { - var request struct { - ProcessList string `json:"processList"` - UserID string `json:"userID"` - } - - if err := json.Unmarshal(requestData, &request); err != nil { - return errors.New("invalid request payload") - } - - game := "" - for knownGame := range knownGames { - if strings.Contains(request.ProcessList, knownGame) { - game = knownGame - break - } - } - - if game != "" { - if err := p.SetUserGameStatus(request.UserID, game); err != nil { - return errors.New("failed to update user status: " + err.Error()) - } - } - - return nil -} - // InitRoutes initializes any needed routes or commands for the plugin. func InitRoutes(p *Plugin) { // Register the command that the user will call to set their game.