Kim Alvefur
e3911ce5da
mod_mam,mod_muc_mam: Allow other work to be performed during archive cleanup ( 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.
6 years ago
Kim Alvefur
1f8daf736d
mod_mam: Archive XEP-0353: Jingle Message Initiation
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
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
80aaa484c3
mod_mam: Remove unused variables [luacheck]
...
Logic using full vs bare JID addressing may return in the future.
6 years ago
Kim Alvefur
ba452d6923
mod_mam: Don't store any groupchat messages
...
The intent was to not store MUC groupchat messages, which are sent from
the MUC to local full JIDs, while allowing for potential future
account based group chat. However, since this function handles messages
in both directions and outgoing MUC messages are sent to the bare room
JID, those were stored.
6 years ago
Kim Alvefur
966c3c5604
mod_mam: Make note of Experimental (or Deferred) XEPs
...
Since these XEPs are subject to change we may need come back and double
check these in the future.
6 years ago
Kim Alvefur
92150bd359
mod_mam: Save delivery failures (thanks Ge0rG)
...
Makes it possible to learn of delivery failure even if it came bouncing
back while you were offline.
6 years ago
Kim Alvefur
9bb75c85c4
mod_mam: Keep chat markers (thanks Ge0rG)
6 years ago
Kim Alvefur
8c1161cf77
mod_mam: Respect no-store hint (thanks Ge0rG)
...
no-store is used in an example in XEP-0313, so obviously this is the
preferred hint
6 years ago
Kim Alvefur
b0dbacb69c
mod_mam: Fix typo in comment
...
If it is with a body then it execution does not get this far
6 years ago
Kim Alvefur
617ac06638
mod_mam: Prefer not archiving if no interesting payloads are found
6 years ago
Kim Alvefur
78668f1be3
mod_mam: Check sender of error instead of receiver
...
The intent is to capture errors to stanzas sent by the local user, so
that they can see why a message failed to be delivered even if the error
came after they went offline.
6 years ago
Kim Alvefur
c8db26be66
mod_mam: Store XEP-0184 receipts and requests
...
Happy now Ge0rG?
6 years ago
Kim Alvefur
e84179de98
mod_mam: Add more positive hints for storage
...
Mostly just lifted from mod_csi_simple
6 years ago
Kim Alvefur
0613c5b47f
mod_mam: Rework hints handling
...
Improved readability and early returns definite yes/no answer.
6 years ago
Kim Alvefur
e5d6376c58
mod_mam: Invert check for type
...
This is based on code in mod_csi_simple and aiming towards being more
flexible and maintainable than a couple of tests for when not to store.
6 years ago
Kim Alvefur
962d36d401
mod_mam: Log 'why' a stanza is archived
...
Logging of 'why not' is already done. Why not both? Will make more sense
when the rules evolve a bit.
6 years ago
Kim Alvefur
5817e5f02d
mod_mam: Factor out "should we store this" into a function
...
Meant to improve readability and ease further improvements to this
algorithm.
6 years ago
Kim Alvefur
9beff3d274
mod_mam: Fix rebase mistake [luacheck]
...
The 'err' was there in trunk
6 years ago
Kim Alvefur
c37b1cc072
mod_mam: Schedule cleanup again if unable to delete messages
6 years ago
Kim Alvefur
669ca29966
mod_mam: Log error when unable to delete old messages ( fix #1479 ) [luacheck]
6 years ago
Kim Alvefur
a74a87fb30
mod_mam: Log error when unable to store stanza ( fix #1478 )
...
Unclear what else to do here.
Caught by luacheck
6 years ago
Kim Alvefur
1c3988b171
mod_mam: More careful validation of MAM query form
...
Adapted from mod_muc_mam
6 years ago
Matthew Wild
0007aa04f1
mod_mam: Add flag to session when it performs a MAM query
6 years ago
Kim Alvefur
f11e984c30
mod_mam: Cache last date that archive owner has messages to reduce writes ( fixes #1368 )
7 years ago
Kim Alvefur
5c3633477b
mod_mam: Perform message expiry based on building an index by date (backport 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.
7 years ago
Kim Alvefur
fcda870911
mod_mam: Propagate item-not-found to client ( fixes #1325 )
7 years ago
Emmanuel Gil Peyrot
6282f9029c
mod_mam: Only accept valid JIDs in <always/> and <never/> prefs. ( fixes #1275 )
7 years ago
Kim Alvefur
40b1e3e0ed
plugins: Remove tostring call from logging
...
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
7 years ago
Kim Alvefur
f179d7fe1c
mod_mam: Remove embedded fallback archive driver ( fixes #972 )
...
It was equivalent to mod_storage_memory, which is included as a separate module now.
7 years ago
Kim Alvefur
e2910e8847
mod_mam: Upgrade case of invalid archive store driver to hard error
7 years ago
Kim Alvefur
182e80684f
mod_mam: Ignore case of null storage driver
7 years ago
Kim Alvefur
b7fc41affc
mod_mam: Add coment on how 'complete' works
8 years ago
Kim Alvefur
48a65eed67
mod_mam: Handle edge-case of max=0 so that complete attr is set ( fixes #1128 )
8 years ago
Kim Alvefur
fa1406845d
mod_mam: Remove unmatched closing paren
8 years ago
Kim Alvefur
1e6c295b68
mod_mam: Add an option for whether to include 'total' counts by default in queries
8 years ago
Kim Alvefur
07c0bc5d54
mod_mam: Log a debug message if archive expiry has been disabled
8 years ago
Kim Alvefur
db93331e68
Backed out changeset 97a094fdf101, interferes with 6ddddfe05a74
8 years ago
Kim Alvefur
4f92c540b6
mod_mam: Implement option to enable MAM implicitly when client support is detected ( #867 )
8 years ago
Kim Alvefur
5841c8c064
mod_mam: Load archiving preferes for offline users ( fixes #1024 )
8 years ago
Emmanuel Gil Peyrot
1574b7a818
mod_mam: Also return the preferences on set
...
Fixes #995 .
8 years ago
Kim Alvefur
32a1219188
mod_mam: Log a message when not archiving because it only had ignored tags
8 years ago
Kim Alvefur
015bc6ad59
mod_mam: Log a message in case archive deletion is not supported by the storage module in use
8 years ago
Kim Alvefur
863374e164
mod_mam: Use a FIFO queue for scheduling archive expiry
8 years ago
Kim Alvefur
3888136262
mod_mam: Factor out <stanza-id> stripping so it can be reused in two places
8 years ago
Kim Alvefur
a9333c4f4b
mod_mam: Clone stanza before stripping stanza id after carbons
8 years ago
Kim Alvefur
88bd13d98b
mod_mam: Clone stanzas before mutating (thanks waqas) ( fixes #961 )
9 years ago
Kim Alvefur
3e15f71ed1
mod_mam: Request a total count if no items are requested
9 years ago
Kim Alvefur
06b5c50c4e
mod_mam: Attach stanza-id to original stanza ( fixes #917 )
9 years ago