Mickael Remond [Fri, 10 Jun 2016 09:01:46 +0000 (11:01 +0200)]
Force use of lager 3.0.2 at most.
Lager 3.2.0 has a bug that prevent it to work with ejabberd.
Lager 3.2.0 bug is fixed in https://github.com/basho/lager/commit/4c87abcd4f9d70a1136fff8f573dc7adcc833e43
Holger Weiss [Sun, 5 Jun 2016 20:36:56 +0000 (22:36 +0200)]
Simplify check for carbon-copied chat states
Let jlib:is_standalone_chat_state/1 unwrap carbon copies rather than
leaving this to the caller. We still export jlib:unwrap_carbon/1, as
this function might also be useful for other purposes.
Holger Weiss [Sun, 5 Jun 2016 19:48:03 +0000 (21:48 +0200)]
mod_client_state: Simplify handling of PEP stanzas
Let mod_client_state simply queue the most recent item of a given PEP
node (from a given contact) instead of also taking the payload namespace
into account.
Holger Weiss [Fri, 3 Jun 2016 19:52:11 +0000 (21:52 +0200)]
XEP-0352: Pass chat states of other resources
Don't hold back (carbon copies of) chat states from other resources, as
they might be used to sync the state of conversations across clients.
E.g., if one client becomes active, another one might want to remove a
notification (immediately).
Add code necessary to support publishing options as described in
XEP-0060, #7.1.5. A node plugin that expects publishing options must
add <<"publish-options">> to the features/0 list and then handle the
publishing options handed over to the publish_item/7 call.
Signed-off-by: Christian Ulrich <christian@rechenwerk.net>
Holger Weiss [Mon, 23 May 2016 22:25:52 +0000 (00:25 +0200)]
mod_mam_mnesia: Don't exceed table size limit
Don't write MAM messages into an Mnesia archive if the size of the table
comes close to the 2 GB limit for tables with disc-only copies. That
way, the table is at least not corrupted when the limit is reached.
Holger Weiss [Mon, 23 May 2016 22:08:23 +0000 (00:08 +0200)]
mod_mam_mnesia: Use transactions when writing
Let mod_mam_mnesia use transactions when storing or deleting messages.
If old messages of a user are to be removed, delete the user's archive
and rewrite it from scratch, as that seems to be much faster than
removing individual records with delete_object/1.
Holger Weiss [Thu, 19 May 2016 23:28:16 +0000 (01:28 +0200)]
mod_muc_room: Notify on affiliation changes
Notify the current room occupants if the affiliation of a non-occupant
is changed as per example 195 of XEP-0045. In anonymous rooms, only
moderators are notified, though.
Holger Weiss [Tue, 17 May 2016 20:12:04 +0000 (22:12 +0200)]
mod_client_state: Add "queue_pep" option
If the new "queue_pep" option is enabled and the client is inactive, PEP
notifications are throttled in a similar way to presence stanzas and
chat states. Only the most recent notification of a given node and
payload type will be queued from a given contact.
Holger Weiss [Tue, 17 May 2016 17:27:18 +0000 (19:27 +0200)]
Move CSI queue handling into mod_client_state
Let mod_client_state handle the queueing of stanzas, not just their
classification. This simplifies the ejabberd_c2s code and gives
(custom) CSI modules more flexibility.
Holger Weiss [Sun, 8 May 2016 13:36:51 +0000 (15:36 +0200)]
Let client retry HTTP upload on file size mismatch
Let the main mod_http_upload process look at the size of an HTTP upload
rather than performing this check in the ejabberd_http handler. This
way, the upload slot won't be invalidated if the size of the uploaded
file doesn't match the size requested for the slot. The PUT request is
still rejected, but the client now has a chance to retry the upload.
Holger Weiss [Fri, 6 May 2016 14:37:17 +0000 (16:37 +0200)]
Avoid error bounces when testing stream management
The test suite sends messages to the server JID while checking whether
the stream management code counts outgoing stanzas correctly. We now
set type='headline' for those messages to avoid error bounces.
Holger Weiss [Fri, 6 May 2016 12:12:22 +0000 (14:12 +0200)]
XEP-0198: Use different error message for bounces
When stanzas are bounced from the stream management queue (because the
session timed out or was closed for some other reason), use a different
error message so that this situation can be distinguished from other
cases.