Software /
code /
prosody-modules
Diff
mod_rest/jsonmap.lib.lua @ 6211:750d64c47ec6 draft
Merge
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 18 Mar 2025 00:31:36 +0700 |
parent | 5982:e5b5a74feb91 |
line wrap: on
line diff
--- a/mod_rest/jsonmap.lib.lua Tue Mar 18 00:19:25 2025 +0700 +++ b/mod_rest/jsonmap.lib.lua Tue Mar 18 00:31:36 2025 +0700 @@ -550,6 +550,12 @@ t.payload.data = json.encode(t.payload.data); end + if type(t.upload_request) == "table" and type(t.upload_request.size) == "string" then + -- When using GET /rest/upload_request then the arguments from the query are all strings + t.upload_request.size = tonumber(t.upload_request.size); + end + + if kind == "presence" and t.join == true and t.muc == nil then -- COMPAT Older boolean 'join' property used with XEP-0045 t.muc = {};