Authoritative Matchmaking

Hello all,

I recently updated to Nakama 3.9.0 from 3.2.1 and some things stopped working, namely the authoritative matchmaking.

local function makematch(context, matched_users)
    -- print matched users
    for _, user in ipairs(matched_users) do
        local presence = user.presence
        nk.logger_info(("Matched user '%s' named '%s'"):format(presence.user_id, presence.username))
        for k, v in pairs( do
            nk.logger_info(("Matched on '%s' value '%s'"):format(k, v))
    local modulename = "matchmaking"
    local setupstate = { invited = matched_users }
    local matchid = nk.match_create(modulename, setupstate)

    return matchid

Basically it never goes in this hook any more.

The full module is pretty much taken from the full example, plus the hook above

nakama_1 | {“level”:“info”,“ts”:“2021-11-21T20:31:57.927Z”,“caller”:“server/runtime.go:2271”,“msg”:“Registered Lua runtime Matchmaker Matched function invocation”}

FYI I reverted to 3.8.0 and matchmaking is working fine again