Kim Alvefur
9b7ab06ef3
mod_csi_simple: Identify raw string data in logging and stats
6 years ago
Kim Alvefur
d4c1384269
mod_csi_simple: Collect stats on flush reasons
6 years ago
Kim Alvefur
edd5966062
mod_csi_simple: Record stats of how long buffers are held
...
Telnet command `stats:show("buffer_hold"):histogram()` looks nice!
6 years ago
Kim Alvefur
4053cca7dc
mod_csi_simple: Change debug message of client-triggered flush for coherence
...
It now matches other the other source of flush reason logging.
6 years ago
Kim Alvefur
e1a3982654
mod_csi_simple: Reset queue counter to zero when enabling
...
For symmetry.
6 years ago
Kim Alvefur
859c3650e5
mod_csi_simple: Forget queue counter when disabling optimizations
...
Otherwise it might not start from zero when enabled again.
6 years ago
Kim Alvefur
cabd89913a
mod_csi_simple: Fix flushing when client sent something
...
Forgot to unset the flag afterwards, so it would only work once.
The flag is not even needed, it works as intended without it.
6 years ago
Kim Alvefur
749ed917c1
mod_csi_simple: Fix treating presence errors as presence updates
...
Autocomplete fail probably.
6 years ago
Kim Alvefur
ade3caf1ad
mod_csi_simple: Add comment highlighting that XEP-0353 is experimental
...
To make it easier to find implemented Experimental XEPs later. Also at
the time of this commit it has been Proposed as mentinoed in the
comment but hopefully that will be resolved soon.
6 years ago
Kim Alvefur
fc8a50cd73
mod_csi_simple: Fix unintentional order of rules from merge
6 years ago
Kim Alvefur
1f8daf736d
mod_mam: Archive XEP-0353: Jingle Message Initiation
6 years ago
Kim Alvefur
4443c44e22
mod_carbons: Explicitly carbon XEP-0353: Jingle Message Initiation
6 years ago
Kim Alvefur
527d16b0b3
mod_carbons: Describe return types in a comment
...
For similarity with mod_mam, mod_csi_simple
6 years ago
Kim Alvefur
71d6bde69c
mod_presence: Send unavailable presence in current thread run
...
`session:dispatch_stanza(pres)` enqueues processing of the stanza in the
sessions async thread, but becasue the entire stream close handling is
now in that thread it would process the presence after the stream and
session was completely closed, leading to weird errors "sent to a
resting session".
We call core_process_stanza() since this is what :dispatch_stanza calls
in the end.
6 years ago
Kim Alvefur
0747cbea53
mod_c2s: Run stream open and close events in async thread, fixes #1103
...
Enables async processing during stream opening and closing.
6 years ago
Kim Alvefur
a7c0def27f
mod_s2s: Run stream close in async context
...
Allows async processing during stream shutdown. Fixes potential ASYNC-01
issues, however no such issues known at the time of this commit.
6 years ago
Kim Alvefur
289898e68f
mod_s2s: Improve signaling of stream open events
...
Makes it clearer, cleaner and easier to extend.
6 years ago
Kim Alvefur
b2baba1124
mod_csi_simple: Log reasons for not flushing
6 years ago
Kim Alvefur
a9ba50343c
mod_csi_simple: Add short reasons to report
...
Should improve quality of debug logs
6 years ago
Kim Alvefur
44847d620c
mod_csi_simple: Refactor to allow logging reason for buffer flush
...
Same style as mod_mam and mod_carbons allows easy comparison.
BC: Log format changes
6 years ago
JC Brand
b00737a6d3
mod_muc: let event handlers modify cloned presence
...
Updates #1533
6 years ago
JC Brand
8da81e9160
Fixes #1533 Hats don't get sent out to own MUC user
6 years ago
Kim Alvefur
92c97b0361
mod_carbons: Clarify handling of error bounces
...
The :find bit was hard to understand, this should be clearer.
6 years ago
Kim Alvefur
9339ebb8e3
mod_csi_simple: Don't consider presence errors as important
...
A large share of `<presence type=error>` appears to be noise from large
public channels and failed presence probes. The later at least should
count as presence updates, which are currently considered unimportant.
See also 8cecb85e4bc4 which is partly reverted here. The intent there
was probably mostly about message (delivery) errors, which should be
considered important.
6 years ago
Kim Alvefur
d146cc6f58
MAM: Remove 1% of contents when reaching limits, fix #1545
...
With mod\_storage\_internal this counts out to 100 messages out of 10 000,
meaning should not hit the quota limit immediately until that many
messages have been added again.
6 years ago
Kim Alvefur
783f5430a5
mod_admin_telnet: Use tostring as fallback in pretty printing
...
This has some nice effects such as functions, VirtualHosts and other
things being printed using their `__tostring` metamethod.
6 years ago
Kim Alvefur
95b5facf3b
mod_admin_telnet: Don't pretty-print the normal console stuff
...
Typing e.g. `c2s` would dump out a bunch of stuff that would probably
just confuse users.
Now you only get pretty-printing when poking around in the internals
with `>`.
6 years ago
Kim Alvefur
f1c4d468e2
mod_admin_telnet: Reuse existing pretty printing setup
...
Didn't do the configurable defaults thing here because I was going to do
this, so that there's only one spot where it's done.
6 years ago
Kim Alvefur
bfdff4488f
mod_admin_telnet: Allow configuring pretty printing defaults
...
Mostly just to have the defaults merged so you can e.g.
output:configure({maxdepth=1})
6 years ago
Kim Alvefur
dc8d810f34
MUC: Enforce strict resourceprep when registering room nicknames
...
If nickname enforcement is enabled this would otherwise let you bypass
the join check in muc.lib by registering an invalid nickname and then
joining with any nickname, letting register.lib change it to the invalid
registered nick.
6 years ago
Kim Alvefur
75a3d7758b
mod_storage_sql: Log database connection parameters when creating engine
...
This is meant to help trace down an issue where Prosody apparently
creates multiple conflicting SQL engines, causing problems especially
with SQLite3, e.g. #616 #784 .
6 years ago
Kim Alvefur
7369538232
mod_admin_telnet: Silence luacheck
6 years ago
Kim Alvefur
222299d18c
mod_admin_telnet: Add a command to configure pretty-printing settings
...
Sometimes you wanna adjust the maxdepth or something.
6 years ago
Kim Alvefur
c38264dd58
mod_admin_telnet: Add a TODO for someone to find in the future
6 years ago
Kim Alvefur
3da0521744
mod_admin_telnet: Document HTTP command in internal help
6 years ago
Kim Alvefur
de35ba33a1
mod_admin_telnet: Document (in the internal help) debug commands
6 years ago
Kim Alvefur
edce14b4a4
mod_admin_telnet: Pretty-print values returned from commands
...
This makes it much nicer to inspect Prosody internals.
Existing textual status messages from commands are not serialized to
preserve existing behavior. Explicit serialization of configuration is
kept in order to make it clear that returned strings are serialized
strings that would look like what's actually in the config file.
The default maxdepth of 2 seems ought to be an okay default, balanced
between showing enough structure to continue exploring and DoS-ing your
terminal.
Thanks to Ge0rG for the motivation to finally do this.
6 years ago
Kim Alvefur
b966c97690
mod_carbons: Check for and strip 'private' tag before stopping
...
This was explicit previously
6 years ago
Kim Alvefur
7041043802
mod_carbons: Don't copy messages that should not be copied
...
The return statements were lost in d95e083931d1
6 years ago
Kim Alvefur
608f1d1c58
mod_carbons: Carbon anything that has been archived by the current user
...
This ensures rules in mod_mam apply to some extent. Messages worth
archiving are probably worth sending to other clients.
6 years ago
Kim Alvefur
9e3ef1c01b
mod_carbons: Carbon incoming message delivery failure reports
...
Ensures that all your clients know about sent messages that failed.
6 years ago
Kim Alvefur
bec170ac73
mod_carbons: Fix syntax error [luacheck]
6 years ago
Kim Alvefur
fe36680fba
mod_carbons: Refactor in new style (mod_mam/csi)
6 years ago
Kim Alvefur
ce1056565d
MUC: Adapt rules for what should be stored from mod_mam
...
This is the subset of mod_mam rules I believe makes sense in MUC.
Note that mod_muc_mam does not have its own rules, but uses these.
6 years ago
Kim Alvefur
e5327bcc31
mod_mam: Store only incoming errors
...
Unclear if clients normally ever send error messages, but there may be
locally generated bounces sent on behalf of local sessions.
6 years ago
Kim Alvefur
0085d410b2
mod_csi_simple: Explicitly mention iq stanzas
...
Should be more obvious that all iq stanzas are considered important.
Changes behavior for invalid things in the default namespace.
6 years ago
Kim Alvefur
37a42fa605
mod_csi_simple: Clarify what might not be stanzas here
6 years ago
Kim Alvefur
ea91b4cc7b
mod_csi_simple: Consider nonzas important
...
This case was previously handled by fall-trough at the end of the
function.
6 years ago
Kim Alvefur
fc3bee71fd
mod_csi_simple: Explicitly consider errors important
...
This was already the case for presence and iq stanzas but not messages.
6 years ago
Kim Alvefur
14083d021e
mod_register_limits: Fix text reason field name for 'throttled'
...
Copy-paste mistake presumably
6 years ago