24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00
Commit Graph

157 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov
c9333f247a Don't crash on malformed IQ
Fixes #2175
2017-12-19 09:15:35 +03:00
Evgeniy Khramtsov
bd064fa3fc Use xmpp:try_subtag/2 wherever possible 2017-12-11 09:46:26 +03:00
Evgeniy Khramtsov
ae66c17ec0 Include <x/> tag in presence errors related to nick change
Refer to example 52 and example 53 of XEP-0045 for details.
Thanks to Daniel Gultsch for spotting this.
2017-12-09 23:13:20 +03:00
Holger Weiss
c2b22bd6c1 mod_muc_room: Fix typo
Thanks to Evgeniy for spotting this.
2017-12-06 16:50:45 +01:00
Holger Weiss
418718de31 mod_muc_room: Include 110 status on shutdown
Add the 110 status code to the presence unavailable stanzas sent to room
occupants on system shutdown.
2017-11-30 23:58:01 +01:00
Evgeniy Khramtsov
10edbe3e09 Improve muc#roominfo and muc#roomconfig forms
Now 'muc#roominfo_contactjid' and 'muc#roominfo_pubsub' fields
are returned within muc#roominfo form. Also, both 'muc#roominfo_pubsub'
and 'muc#roomconfig_pubsub' are now validated.
2017-11-27 13:07:10 +03:00
Holger Weiss
2b3890f1b0 Announce support for stanza IDs
Announce the namespace for stanza IDs as per XEP-0359 v0.5.0.
2017-11-15 00:18:25 +01:00
Evgeniy Khramtsov
f953621ed2 Use xmpp:io_format_error/1 wherever possible 2017-11-14 09:02:43 +03:00
Evgeniy Khramtsov
11829906ac Properly store <subject/> element
Fixes #2099
2017-11-13 11:25:35 +03:00
Evgeniy Khramtsov
e77172a784 Improve a diagnostic text 2017-11-11 09:30:19 +03:00
Evgeniy Khramtsov
7a3092a859 Use new API for IQ routing
Functions ejabberd_local:route_iq/2,3 are now depecated:
ejabberd_router:route_iq/2,3,4 should be used instead.
2017-11-10 18:02:22 +03:00
Evgeniy Khramtsov
902c6d476b Prepare version 0.6.1 of XEP-0313 (MAM) support 2017-11-08 15:15:39 +03:00
Paweł Chmielowski
ee2b5be7f4 Use store_room where possible 2017-10-31 16:12:35 +01:00
Christophe Romain
0452ffc1df Optimize muc subscriptions handling 2017-10-31 14:00:41 +01:00
Paweł Chmielowski
5f0a84a331 Show real jid in mucsub subscription change events 2017-10-30 17:54:55 +01:00
Paweł Chmielowski
0633dd5802 Fix last commit 2017-10-30 13:27:37 +01:00
Paweł Chmielowski
2b363c7aee Add mucsub event for subscribers list changes 2017-10-30 12:34:09 +01:00
Evgeniy Khramtsov
1bb2bae62b Reflect changes in the xmpp lib 2017-10-13 20:48:21 +03:00
Evgeniy Khramtsov
152e0d77c1 Send presence-unavailable when expulsing a participant 2017-10-13 09:17:22 +03:00
Evgeniy Khramtsov
a6e5a5ca9a Resend presences and history if presence possesses <x/> MUC element
Behave according to the new rule from XEP-0045, section 7.2.2:

> When a MUC service receives an <x/> tagged join stanza from an
> already-joined client (as identified by the client's full JID),
> the service should assume that the client lost its synchronization,
> and therefore it SHOULD send exactly the same stanzas to the client
> as if it actually just joined the MUC.
2017-10-09 17:59:22 +03:00
Evgeniy Khramtsov
3192687334 Don't forget to route presence-unavailable
When a user has several resources joined to a room using the same
nick attempts to leave the room from a single resource, route
presence-unavailable back to this (and only this) resource.

Fixes #2007
2017-09-28 11:58:36 +03:00
Evgeniy Khramtsov
e1efd29156 Improve presence-error processing
When a presence-error is received from a participant in a MUC, kick
only this particular participant's full JID, leaving other resources
untouched. This will prevent from erroneous kicking all user's resources
in the presence of "multi-session nicks".
2017-09-26 19:01:54 +03:00
Evgeniy Khramtsov
c378ea403e Add script to extract translation strings 2017-09-24 00:08:01 +03:00
Badlop
2fa6e2fd90 Fix crash when destroying room without providing reason (#1954) 2017-08-21 15:57:48 +02:00
Evgeniy Khramtsov
92532a0d66 Replace gen_fsm with p1_fsm to avoid warnings in OTP20+ 2017-08-05 20:58:21 +03:00
Christophe Romain
b66dab1313 Add muc related hooks 2017-07-27 17:02:06 +02:00
Marc Philipp
976a8c9cc9 Fix mod_muc_admin:set_room_affiliation 2017-06-21 17:20:58 +02:00
Evgeniy Khramtsov
e93762a720 Deprecate misc:encode_base64/1 and misc:decode_base64/1 2017-05-23 10:43:26 +03:00
Evgeniy Khramtsov
fddd6110e0 Don't validate an option in gen_mod:get*opt() functions
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-30 19:01:47 +03:00
Badlop
c0eb85ce53 Allow a room admin also to subscribe another JID 2017-04-26 01:30:12 +02:00
Holger Weiss
3adf720bc1 Use #jid{} type for #muc_unsubscribe.jid 2017-04-19 22:18:23 +02:00
Badlop
d7a999eaf5 Don't use jid:from_string as it's deprecated, see jid.erl line 43 2017-04-19 21:47:59 +02:00
Badlop
177d5fec86 Allow a room admin to unsubscribe another JID 2017-04-13 22:37:39 +02:00
Christophe Romain
b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02: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
e30d41e5f0 Merge branch 'new_queue'
Conflicts:
	rebar.config
	src/mod_muc_admin.erl
2017-03-24 13:27:56 +03:00
Evgeniy Khramtsov
f3ecba0445 Use new xdata compiler API 2017-03-20 09:57:11 +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
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
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
Badlop
a31154c035 Set subscribers nicks when recreating room (thanks to Girdhar Sojitra)(#1495) 2017-01-31 19:18:39 +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
Evgeniy Khramtsov
fc2b71a04e Restore muc_invite_hook (#1467) 2017-01-19 18:24:29 +03:00
Evgeniy Khramtsov
4cf83ca3a7 Restore multiple invitations support (#1468) 2017-01-19 17:26:08 +03:00
Evgeniy Khramtsov
3d9997288d Don't forget to convert muc#roomconfig_mam 2017-01-19 16:42:04 +03:00
Evgeniy Khramtsov
527472f18c Support legacy muc#roomconfig values (#1469) 2017-01-19 11:12:27 +03:00