| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Could not reproduce locally but it complained in CI that
> spec/util_promise_spec.lua:676: Cannot spy on type 'nil', only on functions or callable elements
|
| |
|
|
|
|
| |
Down the rabbit hole we go...
|
|
|
|
|
|
|
| |
Assumes that most number fields are integers, as most numeric types
listed in XEP-0122 are, as are all such fields in Prosody as of this.
Otherwise %g produces something like 1.1259e+15
|
|
|
|
|
| |
So they're separate from the datetime tests, and any future validation
tests
|
|
|
|
| |
Makes it symmetric with parsing.
|
|
|
|
|
| |
Makes more sense than coercing to a string, which would always be
truthy.
|
| |
|
|
|
|
|
|
| |
Clients would generally be using the "max" symbol instead of discovering
this, but this also gets us validation and earlier rejection of out of
bounds values.
|
|
|
|
|
|
|
| |
Disable persistence instead if no items should be persisted.
XEP-0060 is not entirely clear on what either of those option really
mean.
|
|
|
|
|
|
|
|
| |
Default left as 'never' in mod_pubsub to preserve the previous behavior.
Unclear if this is desirable, but can always be changed later.
In mod_pep this allows turning off the automatic resending of most
recent item.
|
| |
|
| |
|
|
|
|
| |
Behaviour follows the same logic as string.sub (so yes, 1-indexed).
|
| |
|
| |
|
|
|
|
|
| |
Hopefully this will eventually be upgraded to RSM, which is why the
argument is called 'resultspec' and is a table.
|
| |
|
|
|
|
|
|
| |
Storage drivers may issue their own IDs tho none of the included ones do
this atm, but the 3rd party module mod_storage_xmlarchive has its
special format.
|
|
|
|
|
| |
Also special thanks to timeless, for wordlessly reminding me to check
for typos.
|
|
|
|
|
|
| |
XEP-0060 says that this the way to indicate that 'persistent-items' is
unsupported, but doesn't explicitly say if it being disabled in the node
configuration also counts as unsupported.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When set to 'false' there is no need for a persistence interface at all,
since items are not persisted after being broadcast.
Had started wondering if maybe the behavior was wrong, after reading
parts of XEP-0060 that pointed in that direction.
Some discussion of this can be found in logs of
xmpp:xsf@muc.xmpp.org?join from around 2021-07-20
Thanks to Ralph for confirming.
|
|
|
|
|
|
| |
Since nodes were always persistent according to the XEP-0060 definition.
Whether data is stored in memory or on disk was not what this setting
was meant for.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes https://prosody.im/security/advisory_20210722/
Backs out 4d7b925652d9
|
| |
| |
| |
| |
| |
| |
| | |
Allows testing e.g. opportunistic writes or other settings easily in CI
or otherwise without editing the config file.
make integration-test PROSODY_NETWORK_SETTINGS='{"opportunistic_writes":true}'
|
| |
| |
| |
| |
| |
| |
| | |
To make it easier to test select and event without having to edit the
config file, e.g. in CI.
make integration-test PROSODY_NETWORK_BACKEND=event
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This should offer some protection against doing evil things to
terminals. Doesn't protect against pure broken UTF-8 garbage however.
See #734
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
thought)
Character sequences could be split across chunk boundaries. Would require a bunch
of code to make that work reliably.
Only apply front_consumed on first chunk, and adjust buffer_pos accordingly.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fixes #1643
API change: The argument to archive_itemstore() changes type to integer
|
| |
| |
| |
| | |
certificate_s_, plural, is the directory setting
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Had a name, using attr() broke it.
|
| | |
|
| |
| |
| |
| |
| | |
This saves awkward fiddlery with varargs and also echoes the
signature of pcall/xpcall.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Usage: promise.join(p1, p2, function (result1, result2)
[...]
end)
|
| | |
|
| |
| |
| |
| |
| | |
Should the xml name/ns go on the array or the items schema? The later
apparently.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|