Skip to content

Commit

Permalink
Fix response with an empty JSON object in status_update message (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncleNight authored Aug 9, 2021
1 parent 2d21307 commit 33653b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nakama/engine/defold.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ function M.socket_send(socket, message, callback)
socket.requests[message.cid] = callback

local data = json.encode(message)
-- Fix encoding of match_create_message to send {} instead of []
if message.match_create ~= nil then
-- Fix encoding of match_create and status_update messages to send {} instead of []
if message.match_create ~= nil or message.status_update ~= nil then
data = string.gsub(data, "%[%]", "{}")
end

Expand Down

0 comments on commit 33653b4

Please sign in to comment.