aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_mam/mod_mam.lua
Commit message (Collapse)AuthorAgeFilesLines
* mod_mam: Log 'why' a stanza is archivedKim Alvefur2020-04-211-1/+1
| | | | | Logging of 'why not' is already done. Why not both? Will make more sense when the rules evolve a bit.
* mod_mam: Factor out "should we store this" into a functionKim Alvefur2020-04-211-13/+21
| | | | | Meant to improve readability and ease further improvements to this algorithm.
* Merge 0.11->trunkKim Alvefur2020-03-111-1/+5
|\
| * mod_mam,mod_muc_mam: Allow other work to be performed during archive cleanup ↵Kim Alvefur2020-03-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | (fixes #1504) This lets Prosody handle socket related work between each step in the cleanup in order to prevent the server from being completely blocked during this. An async storage backend would not need this but those are currently rare.
| * mod_mam: Fix rebase mistake [luacheck]Kim Alvefur2019-12-241-1/+1
| | | | | | | | The 'err' was there in trunk
* | Merge 0.11->trunkKim Alvefur2019-12-241-14/+57
|\ \ | |/ |/|
| * mod_mam: More careful validation of MAM query formKim Alvefur2019-12-231-1/+9
| | | | | | | | Adapted from mod_muc_mam
| * Merge 0.11->trunkMatthew Wild2019-10-031-0/+2
| |\
| * | plugins: Remove tostring call from loggingKim Alvefur2019-07-301-2/+2
| | | | | | | | | | | | | | | | | | Taken care of by loggingmanager now Mass-rewrite using lua pattern like `tostring%b()`
| * | mod_mam: Report correct count of results for forward queriesKim Alvefur2019-07-131-1/+1
| | | | | | | | | | | | | | | #results is only correct for backwards queries, the table is unused for forward queries.
| * | mod_mam: Move final log message to end of query procedureKim Alvefur2019-07-111-3/+3
| | |
| * | mod_mam: Log RSM parametersKim Alvefur2019-07-111-0/+3
| | | | | | | | | | | | | | | Helps when trying to figure out why some queries fail, ie when paging using an archive id that doesn't exist.
| * | mod_mam: Log query failure reasonKim Alvefur2019-07-111-0/+1
| | | | | | | | | | | | | | | The storage engine will usually make a lot of noise for serious errors, but not always.
| * | mod_mam: Log more details in final log messageKim Alvefur2019-07-111-1/+1
| | | | | | | | | | | | Saves you from counting messages sent
| * | mod_mam: Include query id in final log messageKim Alvefur2019-07-111-1/+1
| | | | | | | | | | | | Should make it easier to find related log messages
| * | mod_mam: Use stanza id in log message as fallback if no query idKim Alvefur2019-07-111-1/+1
| | |
| * | mod_mam: Include username that performed queryKim Alvefur2019-07-111-1/+2
| | | | | | | | | | | | Not always easy to find from surrounding logs
| * | mod_mam: Make log message more compactKim Alvefur2019-07-111-4/+5
| | |
| * | Merge 0.11->trunkKim Alvefur2019-05-271-2/+7
| |\ \
| * | | mod_mam: Propagate item-not-found to client (fixes #1325)Kim Alvefur2019-05-051-1/+5
| | | |
| * | | mod_mam: On quota hit, separately delete by time and by item countKim Alvefur2019-03-221-3/+11
| | | | | | | | | | | | | | | | | | | | This is to work around a possible SQL issue where offsets and time stamps don't interact correctly.
| * | | mod_mam: Trim archive when quota has been exceededKim Alvefur2017-11-071-3/+18
| | | |
| * | | Merge 0.11->trunkKim Alvefur2019-03-221-1/+1
| |\ \ \
| * | | | mod_mam: Fix operator precedence (thanks mimi89999)Kim Alvefur2019-01-201-1/+1
| | | | |
| * | | | mod_mam: Handle expiry of messages that expire in the middle of the cut-off dayKim Alvefur2019-01-061-2/+6
| | | | |
| * | | | mod_mam: Measure how long it takes to run the message expiry job jobKim Alvefur2019-01-061-0/+3
| | | | |
| * | | | mod_mam: Fix word order in log messageKim Alvefur2019-01-041-1/+1
| | | | |
| * | | | mod_mam: Perform message expiry based on building an index by dateKim Alvefur2019-01-031-31/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each day, store a set of users that have new messages. To expire messages, we collect the union of sets of users from dates that fall outside the cleanup range. The previous algoritm did not work well with many users, especially with the default settings.
* | | | | mod_mam: Schedule cleanup again if unable to delete messagesKim Alvefur2019-12-241-0/+1
| | | | |
* | | | | mod_mam: Log error when unable to delete old messages (fix #1479) [luacheck]Kim Alvefur2019-12-241-0/+2
| | | | |
* | | | | mod_mam: Log error when unable to store stanza (fix #1478)Kim Alvefur2019-12-231-0/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | Unclear what else to do here. Caught by luacheck
* | | | mod_mam: Add flag to session when it performs a MAM queryMatthew Wild2019-10-031-0/+2
| |_|/ |/| |
* | | mod_mam: Cache last date that archive owner has messages to reduce writes ↵Kim Alvefur2019-05-271-1/+7
| |/ |/| | | | | (fixes #1368)
* | mod_mam: Perform message expiry based on building an index by date (backport ↵Kim Alvefur2019-03-221-31/+43
|/ | | | | | | | | | | of 39ee70fbb009 from trunk) For each day, store a set of users that have new messages. To expire messages, we collect the union of sets of users from dates that fall outside the cleanup range. The previous algoritm did not work well with many users, especially with the default settings.
* mod_mam: Remove embedded fallback archive driver (fixes #972)Kim Alvefur2018-10-251-1/+0
| | | | It was equivalent to mod_storage_memory, which is included as a separate module now.
* mod_mam: Upgrade case of invalid archive store driver to hard errorKim Alvefur2018-10-251-5/+2
|
* mod_mam: Ignore case of null storage driverKim Alvefur2018-10-251-7/+3
|
* mod_mam: Add coment on how 'complete' worksKim Alvefur2018-06-101-0/+2
|
* mod_mam: Handle edge-case of max=0 so that complete attr is set (fixes #1128)Kim Alvefur2018-06-091-1/+1
|
* mod_mam: Remove unmatched closing parenKim Alvefur2018-03-091-1/+1
|
* mod_mam: Add an option for whether to include 'total' counts by default in ↵Kim Alvefur2018-03-071-2/+2
| | | | queries
* mod_mam: Log a debug message if archive expiry has been disabledKim Alvefur2018-03-071-0/+1
|
* Backed out changeset 97a094fdf101, interferes with 6ddddfe05a74Kim Alvefur2018-03-071-3/+1
|
* mod_mam: Implement option to enable MAM implicitly when client support is ↵Kim Alvefur2018-02-211-1/+3
| | | | detected (#867)
* mod_mam: Also return the preferences on setEmmanuel Gil Peyrot2017-09-191-7/+5
| | | | Fixes #995.
* mod_mam: Log a message when not archiving because it only had ignored tagsKim Alvefur2017-09-181-0/+1
|
* mod_mam: Log a message in case archive deletion is not supported by the ↵Kim Alvefur2017-09-121-1/+3
| | | | storage module in use
* mod_mam: Use a FIFO queue for scheduling archive expiryKim Alvefur2017-09-121-4/+11
|
* mod_mam: Factor out <stanza-id> stripping so it can be reused in two placesKim Alvefur2017-09-031-23/+22
|
* mod_mam: Clone stanza before stripping stanza id after carbonsKim Alvefur2017-09-031-0/+1
|