Commit Graph

116 Commits

Author SHA1 Message Date
Evgeniy Khramtsov ad948d33c0 Add description to feature-not-implemented error 2017-04-05 15:19:00 +03:00
Evgeniy Khramtsov 7bcbea2108 Deprecate jlib.erl in favor of aux.erl
Since the main goal of jlib.erl is lost, all auxiliary functions
are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-03-30 14:17:13 +03:00
Evgeniy Khramtsov 02064ae12a Add support for file-based queues
It's now possible to use files as internal packet queues.
The following options are introduced:

* queue_type: the option can be set to `ram` (default) or `file`.
  The option can be set per virtual host.
* queue_dir: path to the directory where queues will be allocated.
  The default is 'queue' directory inside Mnesia directory.
  This is a global option and cannot be set per virtual host.
2017-03-10 15:12:43 +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 485aae8134 Don't pass 'from' and 'to' along with stanza in hooks' arguments 2017-02-24 21:25:25 +03:00
Evgeniy Khramtsov 4892b01eb4 Get rid of unused variable warning 2017-02-24 17:48:17 +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 e564f9ae31 Make a message is not bounced if it's archived 2017-01-21 13:47:47 +03:00
Evgeniy Khramtsov 68cf45a8b9 Archive message before delivering it to offline storage (#1348) 2017-01-21 11:47:04 +03:00
Evgeniy Khramtsov 56ef607904 Add stanza-id to every archived message (#1477) 2017-01-20 23:21:06 +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 87b964a7f6 Make sure 'jabber:client' namespace is added to forwarded messages (#1474) 2017-01-19 18:03:07 +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
Christophe Romain 32e5781a6a Cleanup file headers 2017-01-03 15:58:52 +01:00
Badlop 5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Evgeniy Khramtsov 0f11b1be36 Don't forget to erase cache on user removal 2016-11-24 18:40:20 +03:00
Holger Weiss 114ca786ee Let ejabberd_sm mark copied messages
When multiple resources have the same (highest) priority, ejabberd_sm
dispatches messages addressed to the bare JID (or to an unavailable
resource) to each of these resources.  Such messages are now marked with
an 'sm_copy' flag for all but one of the resources.  This makes it
easier for other modules to identify those duplicates.

Resolves #1356.
2016-11-22 19:25:20 +01:00
Evgeniy Khramtsov b8dcc911a3 Make common tests working again 2016-11-18 13:38:08 +03:00
Evgeniy Khramtsov 7e9f1a6dc1 Don't auto-decode forwarded payload 2016-11-13 13:41:04 +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
Holger Weiss 2a63d0e95a mod_mam: Use user JID for stanza ID 'by' attribute
Use the user (or room) JID instead of the server JID for the 'by'
attribute of <stanza-id/> and <archived/> tags.  That's what the
examples in XEP-0313 v0.2 and XEP-0359 v0.3.0 suggest.
2016-11-01 08:47:08 +01:00
Evgeniy Khramtsov 67720c7713 Add more MUC tests 2016-10-17 13:37:23 +03:00
Holger Weiss b693601dd1 Don't let MAM messages go into offline storage 2016-10-12 23:10:25 +02:00
Evgeniy Khramtsov 6a3691ef7c Add xdata generator and make some code using it 2016-10-07 10:31:03 +03:00
Evgeniy Khramtsov 58969fb854 Improve namespace handling 2016-09-24 14:17:21 +03:00
Evgeniy Khramtsov 151668ac10 Fix dialyzer warnings for mod_mam 2016-09-13 16:56:34 +03:00
Evgeniy Khramtsov e987b88848 Make common tests working again 2016-09-13 12:30:05 +03:00
Holger Weiss 20a510d877 mod_mam: Add 'store_mam_message' hook
The new 'store_mam_message' hook is invoked whenever a MAM message is
stored.
2016-08-15 23:28:36 +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
Holger Weiss 28dde294e5 mod_mam: Don't store messages of type "headline"
XEP-0313 says: "a server SHOULD include in a user archive all of the
messages a user sends or receives of type 'normal' or 'chat' that
contain a <body> element."
2016-08-12 20:38:17 +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
Holger Weiss 9a5f0751be mod_mam: Simplify "assume_mam_usage" option
The "assume_mam_usage" option now takes a boolean value.  Setting it to
"true" has the same effect as "if_enabled" had before.  The "on_request"
behavior is no longer offered, as it made the option (and its
documentation) overly complex.
2016-08-05 01:57:01 +02:00
Evgeniy Khramtsov 8275e95a16 Swap variables in their correct places 2016-07-27 18:06:34 +03:00
Evgeniy Khramtsov 179fcd9521 Rewrite mod_mam and mod_muc to use XML generator 2016-07-25 13:50:30 +03:00
Holger Weiss 8f8c499cfa mod_mam: Fix handling of result set page limit
Restore function clause for handling a client-specified result set page
limit that doesn't exceed mod_mam's upper threshold.
2016-07-19 21:23:30 +02:00
Holger Weiss 9fcb81dea9 mod_mam: Always limit result set page size
Limit the number of messages returned for a given MAM request even if
the client didn't specify an RSM set (not just if the client specified
an RSM set without a limit).

This is still not done for MAM v0.2 requests though, as that version of
the XEP doesn't require clients to support RSM.
2016-07-19 21:08:13 +02:00
Evgeniy Khramtsov f6e960d326 Fix compilation error 2016-07-10 08:45:24 +03:00
Evgeniy Khramtsov 786bd4f26c Use hooks instead of direct calls to mod_mam 2016-07-09 12:43:01 +03:00
Evgeniy Khramtsov 4220a2b98c Make modules loading in a dependent order (#1191) 2016-07-06 14:58:48 +03:00
Christophe Romain cd0244eb71 Merge pull request #1120 from anagromataf/feature/archive-id-in-message-carbons
Send unique stanza id and archived tag also in the message carbons
2016-06-22 15:47:27 +02:00
Christophe Romain 7744339347 Update supported xep version 2016-06-22 11:24:01 +02:00
Holger Weiss 26bce5dee3 mod_mam: Fix "assume_mam_usage: if_enabled" 2016-06-14 16:40:46 +02:00
Tobias Kräntzer 2529acc36c Send unique stanza id and archived tag also in the message carbons
- Change order of the hooks in mod_mam for sending and receiving packets. Messages are archived before a carbon copy is send to the other recourcces.
- Add archived tag and unique stanza id to the outgoing packet to have message carbons with the archive information.
- Add additional hook (in mod_mam) to strip the archive tag for outgoing packets after message carbons have been send.
2016-05-15 20:13:25 +02:00