Tue, 23 Mar 2021 23:55:33 +0100 util.datamapper: Fix error on attempt to coerce nil to something
Kim Alvefur <zash@zash.se> [Tue, 23 Mar 2021 23:55:33 +0100] rev 11483
util.datamapper: Fix error on attempt to coerce nil to something Turns falsy values into nil instead of nothing, which ensures this function always has 1 return value, or table.insert({}) complains. Would still happen on some unexpected input, but that's actually a good thing.
Tue, 23 Mar 2021 21:52:07 +0100 mod_admin_shell: Sort timers by time in debug:timers()
Kim Alvefur <zash@zash.se> [Tue, 23 Mar 2021 21:52:07 +0100] rev 11482
mod_admin_shell: Sort timers by time in debug:timers() Easier to see which timers are happening soon vs further in the future if they are in some sensible order.
Tue, 23 Mar 2021 21:46:11 +0100 mod_c2s: Log a debug message before closing due to c2s_timeout
Kim Alvefur <zash@zash.se> [Tue, 23 Mar 2021 21:46:11 +0100] rev 11481
mod_c2s: Log a debug message before closing due to c2s_timeout It was confusing that the connection would just close without much explanation. Wanted this while investigating https://github.com/conversejs/converse.js/issues/2438
Tue, 23 Mar 2021 19:52:59 +0100 util.datamapper: Deal with locally built stanzas missing xmlns
Kim Alvefur <zash@zash.se> [Tue, 23 Mar 2021 19:52:59 +0100] rev 11480
util.datamapper: Deal with locally built stanzas missing xmlns So the problem is that xmlns is not inherited when building a stanza, and then :get_child(n, ns) with an explicit namespace does not find that such child tags. E.g. local t = st.stanza("foo", { xmlns = "urn:example:bar" }) :text_tag("hello", "world"); assert(t:get_child("hello", "urn:example:bar"), "This fails"); Meanwhile, during parsing (util.xmppstream or util.xml) child tags do get the parents xmlns when not overriding them. Thus, in the above example, if the stanza is passed trough `t = util.xml.parse(tostring(t))` then the assert succeeds. This change makes it so that it leaves out the namespace argument to :get_child when it is the same as the current/parent namespace, which behaves the same for both built and parsed stanzas.
Mon, 22 Mar 2021 22:24:39 +0100 util.datamapper: Factor out conversion from any value to XML string
Kim Alvefur <zash@zash.se> [Mon, 22 Mar 2021 22:24:39 +0100] rev 11479
util.datamapper: Factor out conversion from any value to XML string Since this was the last severely duplicated code left.
Mon, 22 Mar 2021 22:01:49 +0100 mod_authz_internal: Ignore unused argument for now [luachec]
Kim Alvefur <zash@zash.se> [Mon, 22 Mar 2021 22:01:49 +0100] rev 11478
mod_authz_internal: Ignore unused argument for now [luachec]
Mon, 22 Mar 2021 21:24:57 +0100 usermanager: expose set_roles through API
Jonas Schäfer <jonas@wielicki.name> [Mon, 22 Mar 2021 21:24:57 +0100] rev 11477
usermanager: expose set_roles through API
Mon, 22 Mar 2021 21:24:43 +0100 mod_authz_internal: add support for setting roles of a local user
Jonas Schäfer <jonas@wielicki.name> [Mon, 22 Mar 2021 21:24:43 +0100] rev 11476
mod_authz_internal: add support for setting roles of a local user
Mon, 22 Mar 2021 10:05:41 +0100 util.datamapper: Handle nested arrays or objects in arrays
Kim Alvefur <zash@zash.se> [Mon, 22 Mar 2021 10:05:41 +0100] rev 11475
util.datamapper: Handle nested arrays or objects in arrays
Mon, 22 Mar 2021 10:03:32 +0100 util.datamapper: Fix to skip parsing wrapped arrays that aren't there
Kim Alvefur <zash@zash.se> [Mon, 22 Mar 2021 10:03:32 +0100] rev 11474
util.datamapper: Fix to skip parsing wrapped arrays that aren't there Turns out the unreachable error is reachable :D
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip