aboutsummaryrefslogtreecommitdiff
path: root/src/mod_offline.erl (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-06-20Guard against pres_last=undefined in mod_offlinePaweł Chmielowski1-2/+2
2018-06-14Get rid of ejabberd.hrl headerEvgeniy Khramtsov1-1/+0
The header consisted of too many unrelated stuff and macros misuse. Some stuff is moved into scram.hrl and type_compat.hrl. All macros have been replaced with the corresponding function calls. TODO: probably type_compat.hrl is not even needed anymore since we support only Erlang >= OTP 17.5
2018-02-11Remove 'iqdisc' optionEvgeniy Khramtsov1-12/+2
Since we got rid of all bottle-neck processes and we have a connection pool for every database, the option is no longer needed and in fact is detrimental: in practice what you get is just a bunch of overloaded processes in the IQ handlers pool no matter how much you increase the `iqdisc` value. Given that there are close to zero operators understanding the meaning of the option and, hence, not using it all, it's not simply deprecated but completely removed. The commit also deprecates the following functions: - gen_iq_handler:add_iq_handler/6 - gen_iq_handler:handle/5 - gen_iq_handler:iqdisc/1
2018-02-09Introduce option 'validate_stream'Evgeniy Khramtsov1-2/+4
If set to `true`, all incoming XML packets are fully validated against known schemas. If an error occurs, the packet will be bounced with the corresponding error reason. The default value is `false`. The option might be useful to protect client software from sofisticated bugs related to XML validation as well as for client developers who want to catch validation errors at early stage of development. Note that the option might have slight performance impact, so use it with care on loaded machines.
2018-01-23Introduce new gen_mod callback: mod_options/1Evgeniy Khramtsov1-9/+12
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.
2018-01-05Update copyright datesEvgeniy Khramtsov1-1/+1
2017-12-02mod_offline: Always ignore groupchat messagesHolger Weiss1-1/+2
2017-08-25Fix deletion of multiple offline messages using WebAdmin (#1962)Badlop1-12/+15
2017-06-30Fix invalid argument in get_messages_susbset17.06Paweł Chmielowski1-1/+1
This should fix #1818
2017-05-21Don't store messages via a single processEvgeniy Khramtsov1-130/+65
2017-05-04Introduce 'iqdisc' global optionEvgeniy Khramtsov1-2/+2
2017-04-30Don't validate an option in gen_mod:get*opt() functionsEvgeniy Khramtsov1-11/+2
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.
2017-04-25Include original 'id' and 'type' attributes in offline eventEvgeniy Khramtsov1-2/+2
2017-04-25Make sure only jabber:x:event tag is present in offline eventEvgeniy Khramtsov1-2/+2
2017-03-20Use new xdata compiler APIEvgeniy Khramtsov1-1/+1
2017-02-26Get rid of jid:to_string/1 and jid:from_string/1Evgeniy Khramtsov1-6/+6
2017-02-25Don't pass empty resource to jid:make()Evgeniy Khramtsov1-2/+2
2017-02-24Don't pass 'from' and 'to' along with stanza in hooks' argumentsEvgeniy Khramtsov1-1/+1
2017-02-23Include stanza ID with archived offline messagesHolger Weiss1-4/+4
Fixes #1480.
2017-02-22Reload modules when reloading configuration fileEvgeniy Khramtsov1-2/+34
2017-02-18Fix some dialyzer warningsEvgeniy Khramtsov1-29/+24
2017-02-16Change routing APIEvgeniy Khramtsov1-19/+18
Now 'From' and 'To' arguments must be omitted in functions and structures related to routing. The commit deprecates the following functions: ejabberd_router:route/3 in favor of ejabberd_router:route/1 ejabberd_router:route_error/4 in favor of ejabberd_router:route_error/2 ejabberd_local:route_iq/4 in favor of ejabberd_local:route_iq/2 ejabberd_local:route_iq/5 in favor of ejabberd_local:route_iq/3 The format of {route, From, To, Packet} is changed in favor of {route, Packet}
2017-02-14Only use GEN_SERVER macro where appropriateEvgeniy Khramtsov1-5/+1
2017-02-14Attach modules to gen_mod's supervisorEvgeniy Khramtsov1-18/+6
2017-02-14Improve modules start/stop proceduresEvgeniy Khramtsov1-17/+1
2017-01-23Avoid using maps:get/2 to keep compatibility with OTP 17.5Evgeniy Khramtsov1-3/+2
2017-01-23Make test suite working againEvgeniy Khramtsov1-0/+2
2017-01-21Make a message is not bounced if it's archivedEvgeniy Khramtsov1-7/+7
2017-01-18Improve <delay/> tag insertionEvgeniy Khramtsov1-4/+6
2017-01-17Avoid stopping mod_offline before supervisor termination (#1464)Evgeniy Khramtsov1-1/+0
2017-01-13Decode message before checking for expiration (#1458)Evgeniy Khramtsov1-18/+20
2017-01-13Implement database backend interface for MUC, BOSH and auth_anonyousEvgeniy Khramtsov1-4/+0
2017-01-09Adopt remaining code to support new hooksEvgeniy Khramtsov1-45/+89
2017-01-02Update copyright date automatically (#1442)Badlop1-1/+1
2016-12-28Add xmpp_stream_out behaviour and rewrite s2s/SM codeEvgeniy Khramtsov1-5/+5
2016-12-11Initial version of new XMPP stream behaviour (for review)Evgeniy Khramtsov1-36/+32
2016-11-25Use ejabberd_router:route_error/4 wherever possibleEvgeniy Khramtsov1-3/+2
2016-11-24Get rid of excessive (io)list_to_binary/1 callsEvgeniy Khramtsov1-2/+2
2016-11-23Don't use deprecated functions from jlib.erlEvgeniy Khramtsov1-4/+4
2016-11-22Improve ODBC importChristophe Romain1-8/+31
2016-11-18Make common tests working againEvgeniy Khramtsov1-1/+2
2016-11-13Deprecate most of the functions from jlib.erlEvgeniy Khramtsov1-60/+91
2016-11-08Add more tests for offline storageEvgeniy Khramtsov1-40/+58
2016-10-07Add xdata generator and make some code using itEvgeniy Khramtsov1-7/+4
2016-09-24Deprecate jlib:integer_to_binary/1 and jlib:binary_to_integer/1Evgeniy Khramtsov1-1/+1
2016-09-24Improve namespace handlingEvgeniy Khramtsov1-2/+2
2016-09-13Make common tests working againEvgeniy Khramtsov1-1/+1
2016-08-15mod_offline: Add 'store_offline_message' hookHolger Weiss1-8/+16
The new 'store_offline_message' hook is invoked whenever an offline message is stored.
2016-08-12Honor <store/> hint for any non-"error" messageHolger Weiss1-27/+28
XEP-0334 says: "A message containing the <store/> hint that is not of type 'error' SHOULD be stored by the entity."
2016-08-12Add more type specsEvgeniy Khramtsov1-0/+3