Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nakama
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public-projects
Nakama
Commits
bb2c43b3
Commit
bb2c43b3
authored
Oct 16, 2018
by
Mo Firouz
Browse files
Options
Downloads
Patches
Plain Diff
Set default matchmaker input query if none supplied with the request.
parent
7bd0cbc2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
server/pipeline_matchmaker.go
+8
-2
8 additions, 2 deletions
server/pipeline_matchmaker.go
with
9 additions
and
2 deletions
CHANGELOG.md
+
1
−
0
View file @
bb2c43b3
...
...
@@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
### Fixed
-
Use leaderboard expires rather than end active IDs with leaderboard resets.
-
Better validation of tournament duration when a reset schedule is set.
-
Set default matchmaker input query if none supplied with the request.
## [2.1.0] - 2018-10-08
### Added
...
...
This diff is collapsed.
Click to expand it.
server/pipeline_matchmaker.go
+
8
−
2
View file @
bb2c43b3
...
...
@@ -16,11 +16,12 @@ package server
import
(
"fmt"
"time"
"github.com/dgrijalva/jwt-go"
"github.com/gofrs/uuid"
"github.com/heroiclabs/nakama/rtapi"
"go.uber.org/zap"
"time"
)
func
(
p
*
Pipeline
)
matchmakerAdd
(
logger
*
zap
.
Logger
,
session
Session
,
envelope
*
rtapi
.
Envelope
)
{
...
...
@@ -46,8 +47,13 @@ func (p *Pipeline) matchmakerAdd(logger *zap.Logger, session Session, envelope *
return
}
query
:=
incoming
.
Query
if
query
==
""
{
query
=
"*"
}
// Run matchmaker add.
ticket
,
entries
,
err
:=
p
.
matchmaker
.
Add
(
session
,
incoming
.
Q
uery
,
minCount
,
maxCount
,
incoming
.
StringProperties
,
incoming
.
NumericProperties
)
ticket
,
entries
,
err
:=
p
.
matchmaker
.
Add
(
session
,
q
uery
,
minCount
,
maxCount
,
incoming
.
StringProperties
,
incoming
.
NumericProperties
)
if
err
!=
nil
{
logger
.
Error
(
"Error adding to matchmaker"
,
zap
.
Error
(
err
))
session
.
Send
(
false
,
0
,
&
rtapi
.
Envelope
{
Cid
:
envelope
.
Cid
,
Message
:
&
rtapi
.
Envelope_Error
{
Error
:
&
rtapi
.
Error
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment