heroiclabs / nakama-defold

Defold client for Nakama server.
https://heroiclabs.com
Apache License 2.0
81 stars 13 forks source link

on_match_data does not receive opcode #78

Open ropoko opened 5 months ago

ropoko commented 5 months ago

reposting this issue that I reported on the forum.

I get all the data from server, I just do not receive the opcode.

socket.on_match_data(Constants.SOCKET_CONNECTION, function(message)
    print('opcode', message.match_data.op_code) ---> nil
    print('match_data', json.encode(message.match_data))
end
dispatcher.broadcast_message(opcode, nk.json_encode(data), nil, message.sender)

nothing too much crazy, since I can pass the opcode to the data payload, just reporting because it's how it is on the docs.

linear[bot] commented 5 months ago

SDK-824 on_match_data does not receive opcode

msesen commented 5 months ago

Hi @ropoko

I am running the latest versions of the Nakama server and the Nakama-Defold client, and I am able to receive the opcode on socket.on_match_data().

Can you log the value of the opcode before broadcasting the message. The opcode may be nil at origin.