Hello, I’m using Nakama sdk 3.9.0 for Unity game and now adding groups functionality. I just run the example from your website to get user groups, but for some reason it returns nil fields (name, id…). At Nakama Console I see that groups have ids and names, but function is not working correctly.
Code I’m using:
local nk = require(“nakama”)
local function UpdateGroupMetadata(context, payload)
local user_id = "8686545f-af1d-4e44-b045-44f0a5931136"
local groups = nk.user_groups_list(user_id)
for _, g in ipairs(groups) do
local msg = string.format("User has state %q in group %q", g.state, g.name)
nk.logger_info(msg)
end
return nk.json_encode({["success"] = true})
end
nk.register_rpc(UpdateGroupMetadata, “UpdateGroupMetadata”)
Result in terminal:
In Nakama Console I see all groups information including ids and names.
Please help…