Open ChrisYo-o opened 2 days ago
Here is a pretty printed result of pprint
ing what socket.channel_join
returns using MarvelMovieFans
as roomname
at first glance, it appears the nakama implementation wraps everything into a channel table to have a cid
outside of it. it would be better if cid
was return within channel and then the channel table is returned directly. Also, the way the channel.id
is generated needs to be investigated as it seems to be incorrect, it should be the same as room_name in this case.
Please note though that passing MarvelMovieFans
as the channel_id
for socket.channel_message_send
does not work within defold as the Nakama docs say it should - and the nakama-defold docs say it should - because nakama-defold is expecting that weird 2...MarvelMovieFans
id.
According to the official Nakama docs here: https://heroiclabs.com/docs/nakama/concepts/chat/
This code should return a table with id as a child
The way it currently works in defold is that a table containing a channel table is returned, so in defold we would have to use
channel.channel.id
to get the correct channel id.Also, for some reason I cannot understand, the channel_id is a very unintuitive name like
1...MarvelMovieFans
or2...MarvelMovieFans
instead ofMarvelMovieFans
. I'm not sure if the defold wrapper is the one messing up the channel_id and requires the weird name to be used, or if nakama is bugged - but I suspect it's the nakama-defold implementation.The nakama-defold documentation is also wrong because of this:
It's my understanding that this WOULD work if we could actually use the
channel_id
as the nakama docs intend for us to (no weird2..
prefix), so if that's fixed this documentation may be automatically fixed - that's the ideal situation.