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
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
Holger Weiss
14e771d871
mod_pubsub: Fix last item cache for multiple hosts
...
Don't let the last item cache intermix PubSub items of different virtual
domains.
2017-01-21 00:14:56 +01: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
Christophe Romain
4f5d54f062
Try db migration only when mnesia is configured ( #1458 )
2017-01-20 09:26:13 +01:00
Evgeniy Khramtsov
0baaad30b1
Implement database backend interface for MUC, BOSH and auth_anonyous
2017-01-13 12:03:39 +03:00
Christophe Romain
6ff81946cf
Fix migration of old pubsub database ( #1409 )
2017-01-10 12:10:11 +01: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
Holger Weiss
df92d96d4f
Revert "Fix 'nodetree' configuration lookups for PEP"
...
This reverts commit 7ef8dfb4e0
.
The config/3 function copes with the PEP case.
2016-12-25 01:24:40 +01:00
Holger Weiss
7ef8dfb4e0
Fix 'nodetree' configuration lookups for PEP
2016-12-25 00:58:20 +01:00
Evgeniy Khramtsov
5cc8e807df
Initial version of new XMPP stream behaviour (for review)
2016-12-11 15:03:37 +03:00
Christophe Romain
92db9ff105
Improve handling of mnesia schema
2016-11-30 11:09:17 +01:00
Evgeniy Khramtsov
49f1275e20
Get rid of excessive (io)list_to_binary/1 calls
2016-11-24 15:06:06 +03:00
Evgeniy Khramtsov
5d434c1aea
Move copyright definition to ejabberd.hrl
2016-11-23 15:51:48 +03:00
Christophe Romain
2929f5b5bc
Minor cosmetic changes on pubsub code
2016-11-15 18:35:20 +01: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
6a3691ef7c
Add xdata generator and make some code using it
2016-10-07 10:31:03 +03:00
Christophe Romain
767dba8f3b
PubSub: fix notification on subscription change
2016-09-29 12:00:59 +02: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
e987b88848
Make common tests working again
2016-09-13 12:30:05 +03:00
Evgeniy Khramtsov
c29a48695d
Rename #error{} record to #stanza_error{}
2016-09-08 17:08:48 +03:00
Evgeniy Khramtsov
5ec972b00f
Improve pubsub code
2016-09-08 15:49:27 +03:00
Holger Weiss
e29f47893f
mod_pubsub: Remove outdated comment
2016-09-06 00:05:54 +02:00
Evgeniy Khramtsov
45eb49125b
Rewrite mod_pubsub to use XML codec
2016-08-30 09:48:08 +03: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
Christophe Romain
6b38d19085
Do send last items only for subscription on current plugin type
2016-07-08 15:18:39 +02:00
Evgeniy Khramtsov
4220a2b98c
Make modules loading in a dependent order ( #1191 )
2016-07-06 14:58:48 +03:00
Paweł Chmielowski
0737958b45
Fix compilation issues on R19
2016-07-01 21:20:10 +02:00
Holger Weiss
1794dd19d0
mod_pubsub: Fix matching of set_node/1 result
...
nodetree_tree_sql:set_node/1 returns {result, NodeIdx} on success, not
{ok, NodeIdx}. Thanks to Christophe Romain for spotting this.
2016-06-23 14:23:24 +02:00
Holger Weiss
78d4200f05
mod_pubsub: Fix node configuration changes for SQL
...
nodetree_tree_sql:set_node/1 returns {ok, NodeIdx} rather than 'ok' on
success.
2016-06-06 00:18:24 +02:00
Holger Weiss
c958fa2f06
Add support for PubSub publishing options
...
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>
2016-05-25 08:40:12 +02:00
Christophe Romain
07196b6c62
Fix sender in case of explicit pep subscriptions
2016-05-02 15:04:14 +02:00
Christophe Romain
639c2fb640
Add pubsub subscribe/unsubscribe hook
2016-04-28 15:57:55 +02:00
Evgeniy Khramtsov
9c369b7a8c
Improve detection of databases supported by modules ( #1092 )
2016-04-27 17:10:50 +03:00
Christophe Romain
ef90a389c1
Fix use of pubsub node plugin when configured with default_node_config
2016-04-25 09:44:46 +02:00
Evgeniy Khramtsov
1aae8a9fda
Rename odbc to sql everywhere
2016-04-20 13:25:42 +03:00
Evgeniy Khramtsov
9ac6e4edf7
Replace more ?ERR_* macros with ?ERRT_*
2016-04-05 13:09:44 +03:00
Evgeniy Khramtsov
55c567ff00
Unregister route at the very end
2016-03-13 17:37:39 +03:00
Evgeniy Khramtsov
5045fb584d
Define pubsub node configuration per route/host explicitly
2016-03-13 13:16:43 +03:00
Evgeniy Khramtsov
357e48fb6b
Make it possible to get virtual host of a registered route
2016-03-13 11:38:40 +03:00
Christophe Romain
9297782868
Fix config fetch after host/serverhost cleanup
2016-03-11 17:25:46 +01:00
Evgeniy Khramtsov
b5121a346d
Experimental MIX (XEP-0369) support
2016-03-08 20:04:29 +03:00
Elias Rohrer
8e6a301026
Fixed type specifications for 'rebar doc'
...
- Fixed type @specs and -specs to remove 'rebar doc' errors
- Removed a lot of wrong and deprecated documentation in ejabberd_piefxis.erl
2016-03-07 15:06:19 +01:00
Christophe Romain
10d6c330a5
Fix pubsub disco after host/serverhost cleanup
2016-03-03 14:52:03 +01:00
Christophe Romain
56523784e1
Implementation of pubsub#itemreply (EJAB-1347)( #928 )
2016-02-26 10:32:03 +01:00
Christophe Romain
1c6d20924b
Fix host/serverhost usage ( #902 )
2016-02-26 09:33:07 +01:00
Mickael Remond
dfc29ea03c
Switch to Fast XML module
2016-02-03 19:03:17 +01:00
Nathan Bruning
80fc34fb0c
Fix presence-based delivery
2016-02-02 14:06:07 +01:00
Badlop
f448ff608a
Update copyright to 2016 ( #901 )
2016-01-13 12:29:14 +01:00
Christophe Romain
6957e892dd
Fix last item message type as message attribute
2015-12-16 17:04:45 +01:00
Christophe Romain
c8986ffa5e
Use correct notification_type for last items ( #827 )
2015-12-16 16:19:35 +01:00
Christophe Romain
08b0530164
Don't read pubsub options when plugin does not use them
...
This also revert commit 6052f7b
2015-12-16 12:56:06 +01:00
Christophe Romain
3b69d26368
Fix pubsub headers
2015-12-15 16:12:20 +01:00
Christophe Romain
6357ea1d5d
Limit number of subscriptions per node and allow custom default node configuration
2015-12-11 12:46:44 +01:00
Christophe Romain
86a8606fd1
Virtual nodetree is not attached to any backend
2015-12-11 12:46:40 +01:00
Christophe Romain
c4943cffe8
Follow pubsub configuration when using virtual nodetree
2015-12-11 12:46:35 +01:00
Christophe Romain
10c920ef13
Don't force max_items_node to MAXITEMS if not defined
2015-12-11 12:30:16 +01:00
Paweł Chmielowski
5ac10d6555
Remove now() in pubsub code
2015-12-07 16:16:11 +01:00
Evgeniy Khramtsov
95265dd3ad
Move JID related functions to jid.erl ( #847 )
2015-11-24 18:44:13 +03:00
Christophe Romain
880114a909
Enforce get_allowed_items_call
2015-10-07 16:40:37 +02:00
Christophe Romain
6aeb9dcb38
cosmetic cleanup
2015-10-07 14:18:38 +02:00
Christophe Romain
d481017746
Merge pull request #642 from weiss/pep-on-caps-update
...
Also send PEP notifications when local contact updates CAPS
2015-07-24 12:07:22 +02:00
Christophe Romain
9c36a9df78
Do not init nodes from mod_pubsub ( #609 )
...
Let each plugin do its own initialisation in init_plugins
init_nodes was an old function to be removed.
2015-07-22 08:03:27 +02:00
Holger Weiss
0f96414279
Trigger PEP notifications on CAPS updates
...
Let mod_pubsub send last items whenever a contact updates the entity
capabilities. This was already done for remote contacts and is now also
done for local contacts.
2015-07-07 09:33:00 +02:00
Holger Weiss
edb18deb8f
mod_pubsub: Explain caps_update usage in a comment
...
The reason to use the caps_update hook for sending last items to remote
contacts is probably not obvious.
2015-07-06 23:45:25 +02:00
Badlop
6631078884
Document a few more supported protocols
2015-06-22 13:11:37 +02:00
Christophe Romain
d528457ba5
Don't force persistence if cache enabled (fix previous commit)
2015-06-18 12:54:46 +02:00
Christophe Romain
e5a98b100d
Fix max_items and don't let PEP depends on item cache
2015-06-18 12:06:29 +02:00
Evgeniy Khramtsov
fb6267f38e
Add config validation at startup
2015-06-01 15:38:27 +03:00
Christophe Romain
b83c07251c
Fix pubsub/odbc crash on remote user unsubscribe (EJAB-1483)
2015-05-26 19:19:57 +02:00
Badlop
0c725b5fac
Document protocol support (EJABS-1620)
2015-05-21 17:04:05 +02:00
Christophe Romain
8bb994dbca
Call integer_to_binary using jlib ( #554 )
2015-05-18 17:30:25 +02:00
Evgeniy Khramtsov
9c85cb5f25
Fix validating function for iqdisc
2015-04-23 14:59:18 +03:00
Christophe Romain
38dd44e18f
Improve purge_offline filter and speed ( #543 )
2015-04-22 18:11:39 +02:00
Christophe Romain
6e4d6caebf
Add support for publish-only ( #30 )
2015-04-21 17:23:59 +02:00
Christophe Romain
cf37f3977a
Fix typo, oups...
2015-04-21 16:13:23 +02:00
Christophe Romain
61f80396da
remove deferred Collection shim header
2015-04-21 16:11:00 +02:00
Christophe Romain
747d25b4ad
Fixed node type (thanks to saczawap) ( #435 )
2015-04-21 15:24:24 +02:00
Christophe Romain
e0563e3918
PubSub improvements
...
This commit contains
- code cleanup
- use of db_type instead of old mod_pubsub_odbc
- some minor optimizations
- some minor bugfixes
2015-04-21 15:24:16 +02:00
Holger Weiss
f40e6a0421
Don't bother with filtering out PEP error messages
...
Now that ejabberd_sm won't deliver error messages that were sent to bare
JIDs anymore, PEP error messages should no longer arrive.
2015-03-25 02:02:08 +01:00
Christophe Romain
a265ea53f9
Merge pull request #384 from weiss/fix-last-item-type
...
Use correct message type when sending last published PEP/PubSub items
2015-02-27 11:40:12 +01:00
Badlop
5a35405cd5
Update copyright dates to 2015 (EJAB-1733)
2015-01-08 17:34:43 +01:00
Holger Weiss
d734f6beca
Use correct message type for last published items
...
When sending last published PubSub/PEP items, set the message type
that was used for broadcasting those items originally.
2014-12-21 20:11:05 +01:00
Holger Weiss
e5428c5500
Improve add_message_type/2 function
...
Let add_message_type/2 accept the type as an atom, and let the function
handle the 'normal' message type. This doesn't change the behavior, but
avoids some code duplication.
2014-12-21 18:44:53 +01:00
Jerome Sautret
cc958f7787
Fix upgrade of PubSub mnesia tables from older ejabberd version.
2014-12-18 11:51:28 +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
Evgeny Khramtsov
e97e56d776
Merge pull request #363 from weiss/drop-pep-errors
...
Don't route PEP error messages to clients
2014-11-25 14:20:11 +03:00
Holger Weiss
30687c40ef
Don't route PEP error messages to clients
2014-11-24 21:19:32 +01:00
Holger Weiss
84c227e6ae
Don't duplicate last published PEP items
...
When a contact becomes available, usually both the 'caps_update' hook
and the 'presence_probe_hook' are called. For remote contacts, both
hooks triggered PEP notifications, so each item was sent twice. Fix
this by ignoring the 'presence_probe_hook' for remote contacts.
2014-11-18 01:13:22 +01:00
Holger Weiss
f69d1ca282
Send last PEP items to remote subscribers
...
When a remote subscriber becomes available, send him the last published
PEP items, as we do for local subscribers.
However, the current implementation depends on a running ejabberd_c2s
process of the publisher to send items to remote subscribers. So, for
those, the behavior is always like it is for local subscribers when
"ignore_pep_from_offline" is set to "true".
2014-11-14 01:33:11 +01:00
Holger Weiss
830fdccd21
Don't broadcast last published PEP items
...
When a client becomes available, don't send the last published PEP items
of all his peers to all his other peers, but only to that client.
2014-11-14 01:03:26 +01:00
Holger Weiss
5cc30c3977
Move routing of last PEP items into new function
...
This doesn't change the behavior, but avoids some code duplication.
2014-11-14 00:16:13 +01:00
Nathan Bruning
4f63cb21c2
Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup.
2014-08-03 21:03:16 +02:00
Nathan Bruning
99c28ab4d6
Fix configuraton with custom nodetree plugin
2014-07-15 12:04:06 +02:00
Christophe Romain
58717923eb
Fix PEP broadcasting issue (EJAB-1680)
2014-05-06 12:37:44 +02:00
Christophe Romain
a6244275b7
remove compilation warnings
2014-05-05 18:16:48 +02:00