Commit Graph

208 Commits

Author SHA1 Message Date
Evgeniy Khramtsov f3ecba0445 Use new xdata compiler API 2017-03-20 09:57:11 +03:00
Evgeniy Khramtsov c1439ddd5b Get rid of jid:to_string/1 and jid:from_string/1 2017-02-26 10:07:12 +03:00
Evgeniy Khramtsov 603ec9cb19 Don't pass empty resource to jid:make() 2017-02-25 10:01:01 +03:00
Evgeniy Khramtsov 485aae8134 Don't pass 'from' and 'to' along with stanza in hooks' arguments 2017-02-24 21:25:25 +03:00
Holger Weiss b475df2250 Include stanza ID with archived offline messages
Fixes #1480.
2017-02-23 16:55:35 +01:00
Evgeniy Khramtsov 3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Evgeniy Khramtsov 940ca9311d Fix some dialyzer warnings 2017-02-18 09:36:27 +03:00
Evgeniy Khramtsov 8b2d308498 Change routing API
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-16 11:10:24 +03:00
Evgeniy Khramtsov f61c933a7a Only use GEN_SERVER macro where appropriate 2017-02-14 15:39:57 +03:00
Evgeniy Khramtsov 28f66ddd7c Attach modules to gen_mod's supervisor 2017-02-14 12:39:26 +03:00
Evgeniy Khramtsov f664e39374 Improve modules start/stop procedures 2017-02-14 10:25:08 +03:00
Evgeniy Khramtsov 48d8498dbb Avoid using maps:get/2 to keep compatibility with OTP 17.5 2017-01-23 16:30:16 +03:00
Evgeniy Khramtsov 435e5e6263 Make test suite working again 2017-01-23 13:51:05 +03:00
Evgeniy Khramtsov e564f9ae31 Make a message is not bounced if it's archived 2017-01-21 13:47:47 +03:00
Evgeniy Khramtsov d5d906184f Merge branch 'new_stream'
Conflicts:
	src/cyrsasl.erl
	src/ejabberd_c2s.erl
	src/ejabberd_cluster.erl
	src/ejabberd_frontend_socket.erl
	src/ejabberd_node_groups.erl
	src/ejabberd_router.erl
	src/mod_bosh.erl
	src/mod_ip_blacklist.erl
	src/mod_muc_mnesia.erl
	src/mod_offline.erl
	src/mod_proxy65_sm.erl
2017-01-20 19:35:46 +03:00
Evgeniy Khramtsov ba47fd4649 Improve <delay/> tag insertion 2017-01-18 14:09:39 +03:00
Evgeniy Khramtsov c7476875e6 Avoid stopping mod_offline before supervisor termination (#1464) 2017-01-17 14:31:00 +03:00
Evgeniy Khramtsov 7606be93d5 Decode message before checking for expiration (#1458) 2017-01-13 14:20:25 +03:00
Evgeniy Khramtsov 0baaad30b1 Implement database backend interface for MUC, BOSH and auth_anonyous 2017-01-13 12:03:39 +03:00
Evgeniy Khramtsov 1e55e018e5 Adopt remaining code to support new hooks 2017-01-09 17:02:17 +03:00
Badlop 5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Evgeniy Khramtsov 309bdfbe28 Add xmpp_stream_out behaviour and rewrite s2s/SM code 2016-12-28 09:47:11 +03:00
Evgeniy Khramtsov 5cc8e807df Initial version of new XMPP stream behaviour (for review) 2016-12-11 15:03:37 +03:00
Evgeniy Khramtsov ca1b22bdd4 Use ejabberd_router:route_error/4 wherever possible 2016-11-25 11:41:24 +03:00
Evgeniy Khramtsov 49f1275e20 Get rid of excessive (io)list_to_binary/1 calls 2016-11-24 15:06:06 +03:00
Evgeniy Khramtsov 6f2f1e87c9 Don't use deprecated functions from jlib.erl 2016-11-23 10:41:26 +03:00
Christophe Romain fbfbb96872 Improve ODBC import 2016-11-22 14:48:01 +01:00
Evgeniy Khramtsov b8dcc911a3 Make common tests working again 2016-11-18 13:38:08 +03:00
Evgeniy Khramtsov b8f22ff538 Deprecate most of the functions from jlib.erl 2016-11-13 10:44:53 +03:00
Evgeniy Khramtsov 78a44e0176 Merge branch 'master' into xml-ng
Conflicts:
	src/adhoc.erl
	src/cyrsasl_oauth.erl
	src/ejabberd_c2s.erl
	src/ejabberd_config.erl
	src/ejabberd_service.erl
	src/gen_mod.erl
	src/mod_admin_extra.erl
	src/mod_announce.erl
	src/mod_carboncopy.erl
	src/mod_client_state.erl
	src/mod_configure.erl
	src/mod_echo.erl
	src/mod_mam.erl
	src/mod_muc.erl
	src/mod_muc_room.erl
	src/mod_offline.erl
	src/mod_pubsub.erl
	src/mod_stats.erl
	src/node_flat_sql.erl
	src/randoms.erl
2016-11-12 13:27:15 +03:00
Evgeniy Khramtsov e841a6ec34 Add more tests for offline storage 2016-11-08 15:15:19 +03:00
Evgeniy Khramtsov 6a3691ef7c Add xdata generator and make some code using it 2016-10-07 10:31:03 +03:00
Evgeniy Khramtsov fa31e3ef23 Deprecate jlib:integer_to_binary/1 and jlib:binary_to_integer/1 2016-09-24 23:34:28 +03:00
Evgeniy Khramtsov 58969fb854 Improve namespace handling 2016-09-24 14:17:21 +03:00
Evgeniy Khramtsov e987b88848 Make common tests working again 2016-09-13 12:30:05 +03:00
Holger Weiss 8821cf8b27 mod_offline: Add 'store_offline_message' hook
The new 'store_offline_message' hook is invoked whenever an offline
message is stored.
2016-08-15 22:30:08 +02:00
Holger Weiss bf9d6b5534 Honor <store/> hint for any non-"error" message
XEP-0334 says: "A message containing the <store/> hint that is not of
type 'error' SHOULD be stored by the entity."
2016-08-12 21:13:10 +02:00
Evgeniy Khramtsov 31faa4eb9a Add more type specs 2016-08-12 13:17:42 +03:00
Evgeniy Khramtsov 522a186a38 Improve some type specs 2016-08-09 10:56:32 +03:00
Evgeniy Khramtsov 4ff8d7918a Change code to reflect recent changes in fxml_gen 2016-08-05 08:41:08 +03:00
Evgeniy Khramtsov a4a9dd7f03 Rewrite mod_offline to use XML generator 2016-07-19 07:56:14 +03:00
Badlop 12c0d888b1 Revert "Recover fix of 907e239 lost in 9deb294 (thanks to Alexey Shchepin)" (#1183)
This reverts commit 53f3a45803.
2016-07-06 17:54:37 +02:00
Evgeniy Khramtsov 4220a2b98c Make modules loading in a dependent order (#1191) 2016-07-06 14:58:48 +03:00
Paweł Chmielowski 3a8da27d86 Use {access,shaper}_rules_validator in other places where access rules are used 2016-06-21 13:18:24 +02:00
Badlop 53f3a45803 Recover fix of 907e239 lost in 9deb294 (thanks to Alexey Shchepin) 2016-06-08 19:34:05 +02:00
Holger Weiss 60803f5780 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.
2016-06-05 22:36:56 +02:00
Holger Weiss 4d5eab6662 Unwrap carbon copies when checking for chat states
Detect standalone chat states that were carbon-copied.
2016-06-03 20:28:48 +02:00
Evgeniy Khramtsov 9c369b7a8c Improve detection of databases supported by modules (#1092) 2016-04-27 17:10:50 +03:00
Evgeniy Khramtsov 1aae8a9fda Rename odbc to sql everywhere 2016-04-20 13:25:42 +03:00
Evgeniy Khramtsov 901d2e0aed Clean mod_offline.erl from DB specific code 2016-04-15 13:44:33 +03:00
Evgeniy Khramtsov fced8dc3d9 Replace some ?ERR_* macros with ?ERRT_* 2016-03-31 11:00:29 +03:00
Badlop 9c3d57e63e Mark get_queue_length obsolete, and use count_offline_messages (#970) 2016-03-04 11:09:14 +01:00
Evgeniy Khramtsov e95cf420a2 Enable flexible offline on disco#info as well 2016-03-03 14:10:40 +03:00
Alexey Shchepin 99255631dd Updated some mod_offline SQL queries to the new API 2016-03-02 00:12:11 +03:00
Badlop 02a519a11e Mention new XEP support 2016-02-08 21:35:46 +01:00
Evgeniy Khramtsov 4839ba5ae4 XEP-0013: Flexible Offline Message Retrieval support 2016-02-09 17:59:54 +03:00
Mickael Remond dfc29ea03c Switch to Fast XML module 2016-02-03 19:03:17 +01:00
Evgeniy Khramtsov b20db3b736 Initial version of migration script from Prosody to ejabberd 2016-01-28 14:23:51 +03:00
Badlop f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Holger Weiss e09afe367f Document XEP-0334 support 2015-12-09 22:28:44 +01:00
Holger Weiss 59ba09826b mod_offline: Fix outdated comments 2015-12-08 21:58:54 +01:00
Holger Weiss 90fd7f3780 mod_offline: Honor <store/> hint
Ignore the "store_empty_body" option for messages that have a <store/>
hint as described in XEP-0334, version 0.2.
2015-12-08 21:46:36 +01:00
Paweł Chmielowski 0a846d03bf More now() removal 2015-12-06 15:58:46 +01:00
Holger Weiss 44f5e411c5 mod_offline: Support discarding chat states
XEP-0160 says that standalone chat state notifications should not be
stored offline.  By default, mod_offline discards them now.

Closes #842.
2015-11-26 08:35:49 +01:00
Evgeniy Khramtsov 95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Christophe Romain 6aeb9dcb38 cosmetic cleanup 2015-10-07 14:18:38 +02:00
Holger Weiss 8fe930c3d1 Also check for <no-storage/> hint
Check for the <no-storage/> and <no-permanent-storage/> hints in
addition to <no-store/> and <no-permanent-store/>.  XEP-0334 (0.1)
mentions both variants, and unfortunately, both of them are in use.
2015-07-28 21:08:33 +02:00
Evgeniy Khramtsov fb6267f38e Add config validation at startup 2015-06-01 15:38:27 +03:00
Badlop 0c725b5fac Document protocol support (EJABS-1620) 2015-05-21 17:04:05 +02:00
Evgeniy Khramtsov 4af15df546 Add new 'default_db' option 2015-03-30 12:15:29 +03:00
Badlop 30dc82a98a Fix even more dialyzer warnings 2015-03-27 12:28:24 +01:00
Jerome Sautret 6b67a66a1b Added MySQL support for delete_old_messages (offline) command. 2015-03-20 10:40:19 +01:00
Evgeniy Khramtsov 4d2924a3ef Fix mod_offline termination 2015-03-20 10:40:13 +01:00
Holger Weiss b045bd806a mod_offline: Remove a few superfluous newlines 2015-03-11 20:38:22 +01:00
Holger Weiss 0bfde19ebd Don't crash in mod_offline:export/1
(Thanks to Christophe Romain.)
2015-03-11 20:35:08 +01:00
HAMANO Tsukasa f55de94314 change mod_offline restart type 2015-03-09 20:28:55 +09:00
Badlop 5a35405cd5 Update copyright dates to 2015 (EJAB-1733) 2015-01-08 17:34:43 +01:00
Holger Weiss 9899935e42 Improve interface for adding timestamps
Provide a simpler interface for adding <delay/> and <x/> timestamps to
stanzas.  This also makes sure that only one <delay/> tag and one <x/>
tag is added to a given stanza.
2014-12-07 15:55:18 +01:00
Evgeniy Khramtsov 74b67fa0dc Add new option: store_empty_body 2014-10-27 14:18:09 +03:00
Evgeniy Khramtsov dec1e1f67f Revert "fix mod_offline to store only chat messages with body xml element"
This reverts commit 436f0832c1.
2014-10-27 13:44:46 +03:00
vesvalo 436f0832c1 fix mod_offline to store only chat messages with body xml element 2014-08-08 13:57:27 +04:00
Alexey Shchepin f00725dffb mod_offline now uses gen_server 2014-07-31 14:26:09 +04:00
Evgeniy Khramtsov 568068c79f Get rid of p1_mnesia file 2014-07-17 08:32:13 +04:00
Evgeniy Khramtsov 792b5a24df Serialize records to proplists before storing then in Riak 2014-07-14 08:24:44 +04:00
Evgeniy Khramtsov a5987633e0 Fix compile errors introduced by previous cherry picks 2014-07-10 14:16:33 +04:00
Evgeniy Khramtsov e82219185b Add SQL to Riak converter 2014-07-10 13:29:01 +04:00
Evgeniy Khramtsov 0490c2f139 Improve Riak support 2014-07-10 13:26:37 +04:00
Alexey Shchepin a4b02c38db Updated riak support 2014-07-10 13:15:15 +04:00
Holger Weiss 03fd88e4ec Don't store messages with <no-store/> hint
Honor the <no-store/> hint defined in XEP-0334.
2014-05-12 00:00:34 +02:00
HAMANO Tsukasa d3ed12d4ba fix mod_offline:count_offline_messages/2 2014-05-07 15:38:18 +09:00
badlop 285c4c17cf Merge pull request #146 from jamielinux/master
Update FSF address
2014-04-11 13:35:46 +02:00
Badlop 633d47f784 Update copyright dates to 2014 (EJAB-1679) 2014-03-13 12:30:57 +01:00
Jamie Nguyen 8538997d61 Update FSF address 2014-02-22 10:27:40 +00:00
Evgeniy Khramtsov 807a1fe164 Fix timestamp processing 2013-07-23 15:27:18 +10:00
Evgeniy Khramtsov 8ce22b790d Fix some type errors 2013-07-22 19:24:09 +10:00
Evgeniy Khramtsov d58148fa8d Add SQL to Mnesia converter 2013-07-21 23:10:38 +10:00
Evgeniy Khramtsov f9390f3e9a Fix some dialyzer warnings 2013-06-24 20:04:56 +10:00
Evgeniy Khramtsov 4d8f770624 Switch to rebar build tool
Use dynamic Rebar configuration
Make iconv dependency optional
Disable transient_supervisors compile option
Add hipe compilation support
Only compile ibrowse and lhttpc when needed
Make it possible to generate an OTP application release
Add --enable-debug compile option
Add --enable-all compiler option
Add --enable-tools configure option
Add --with-erlang configure option.
Add --enable-erlang-version-check configure option.
Add lager support
Improve the test suite
2013-06-13 11:11:02 +02:00
Evgeniy Khramtsov 299a0f823a Fix several refactoring related bugs 2013-03-29 19:23:52 +10:00
Badlop 9deb294328 Accumulated patch to binarize and indent code 2013-03-14 10:33:02 +01:00