The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
The changes are very similar to those from previous commit:
* Now there is no need to pass validating function in
gen_mod:get_opt() and gen_mod:get_module_opt() functions,
because the modules' configuration keeps already validated values.
* New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are
introduced.
* Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated.
If the functions are still called, the "function" argument is
simply ignored.
* Validating callback Mod:listen_opt_type/1 is introduced to validate
listening options at startup.
Keep the latest stanzas of each given full JID, rather than dropping
them when stanzas from a different resource are received. This change
makes sure the recipient receives the latest status of all clients of
each contact. It also ensures the recipient will see the current list
of occupants of joined MUC rooms.
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.
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.
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).
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.
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.
Don't offer the CSI stream feature when mod_client_state isn't actually
configured to filter stanzas. This makes sure clients won't send CSI
tags that end up being ignored.