Match_join_attempt's "metadata" parameter is emtpy

My Client’s request to join a match has it’s field “metadata” properly defined, but the parameter “metadata” received by the handler “match_join_attempt” is a empty table.

  1. Versions: Nakama 3.5, Docker, Godot (SDK) and 3.4
  2. Server Framework Runtime language Lua

In GDScript, the call to join_match_async (variable is_master is true):

var match_join_result: NakamaRTAPI.Match = yield(_socket.join_match_async(_world_id, {"is_master" : is_master}), "completed")

The Client’s debug message regarding the request sent. The “metadata” has it’s expected value:

=== Nakama : DEBUG === Sending async request: MatchJoin<match_id=[...].nakama1, token=Null, metadata={is_master:True}>

In the Lua Server Runtime’s match_join_attempt handler, when printing every key/value pair of the parameter metadata, the table is empty:

local function metadata2string(metadata)
    local txt = {"{ "}
    for k, v in pairs(metadata) do
        txt[#txt+1] = table.concat({" [",k," = ",v,"]"})
    txt[#txt+1] = " }"
    return table.concat(txt)


function world_control.match_join_attempt( context, dispatcher, tick, state, presence, metadata )
 nakama.logger_debug(metadata2string) -- prints only "{  }"

The value in every key/value pair of the metadata table can only be of type String.

In runtime_lua_match_core.go : line 296 the value is treated only as String:

metadataTable.RawSetString(k, lua.LString(v))

After I changed the type of the entries in my metadata to String, the metadata table arrived correctly in the match_join_attempt handler.