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

191 Commits

Author SHA1 Message Date
Holger Weiss
30393bb690 Move unwrap_mucsub_message/1 into misc 2018-10-25 01:22:57 +02:00
Holger Weiss
a8b11b6474 Move some functions from xmpp back into ejabberd 2018-10-25 01:05:45 +02:00
Badlop
b010a1a0a0 Affiliations other than admin and owner cannot invite to members_only rooms
This is explained in the paragraph:
 If the room is members-only, the service MAY also add the invitee to the
 member list. (Note: Invitation privileges in members-only rooms SHOULD be
 restricted to room admins; if a member without privileges to edit the
 member list attempts to invite another user, the service SHOULD return
 a <forbidden/> error to the occupant; for details, see the Modifying the
 Member List section of this document.)
https://xmpp.org/extensions/xep-0045.html#invite-mediated
2018-10-17 12:57:18 +02:00
Paweł Chmielowski
914fae3d3e Change logic for archiving mucsub messages
This change should apply usual logic for message wrapped in mucsub except
check for groupchat message, so messages without bodies for example
should be rejected
2018-10-10 18:12:35 +02:00
Badlop
e054c2800b Allow a subscribed owner/admin to kick lower-affiliation moderator 2018-09-25 10:55:57 +02:00
Badlop
49f1b4a691 Allow an occupant owner/admin to kick lower-affiliation moderator 2018-09-25 10:55:56 +02:00
Badlop
8b61c7fe4b Allow a subscribed owner/admin to kick participants and visitors 2018-09-25 10:55:54 +02:00
Badlop
9bac2fa185 Allow a subscribed owner/admin to change participant<->visitor 2018-09-25 10:55:51 +02:00
Paweł Chmielowski
0394baaa7a Allow changing invitation message from muc_invite hook 2018-09-21 16:37:52 +02:00
Badlop
d5c1174385 Revert "New option tombstone_expiry locks recent room creation after destroy (#2546)"
This reverts commit efb4fd0d10.
2018-09-17 12:28:39 +02:00
Holger Weiss
adf0d7de91 mod_muc_room: Fix the room's CAPS hash
Don't forget the room's xdata when calculating the CAPS hash.
2018-09-14 00:18:17 +02:00
Paweł Chmielowski
79c511a441 Add information about real sender to mucsub message meta 2018-09-06 13:36:59 +02:00
Evgeniy Khramtsov
88d0b71d58 Get stacktrace out of lager context
Calling erlang:get_stacktrace() inside lager functions produces
stacktraces of the logging function itself, not the function which has failed.
2018-09-01 19:37:26 +03:00
Badlop
8f0e066135 In response with list of room subscriptions include also events (#2272) 2018-08-13 12:52:33 +02:00
Badlop
efb4fd0d10 New option tombstone_expiry locks recent room creation after destroy (#2546)
Setting the new mod_muc option tombstone_expiry to a positive integer
will make that any room destroyed gets replaced with a room tombstone.
That tombstone cannot be joined, so it blocks accessing the old room JID
until the expiry seconds have passed.
The default value is 0 seconds, so tombstones are not created.
2018-07-30 19:24:35 +02:00
Evgeniy Khramtsov
491993d401 Reload internal room's configuration when mod_muc is reloaded
Fixes #2513
2018-07-08 14:52:12 +03:00
Evgeniy Khramtsov
ed1ee6061e Move move randoms module to p1_utils repo 2018-07-05 11:51:49 +03:00
Evgeniy Khramtsov
50b645aa92 Move shaper to p1_utils repo 2018-07-05 09:31:55 +03:00
Evgeniy Khramtsov
6acac7c93f Render roomname, allowinvites and allowpm in room disco#info 2018-06-19 14:02:45 +03:00
Evgeniy Khramtsov
49b08949b1 Do not check for deprecated types
Since we support only Erlang >= OTP-17.5, the check for old-style
dict/queue/etc types is no longer needed
2018-06-14 18:58:35 +03:00
Evgeniy Khramtsov
fd8e07af47 Get rid of ejabberd.hrl header
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-06-14 14:00:47 +03:00
Evgeniy Khramtsov
4337300fce Always display room's xdata in disco#info 2018-06-01 09:07:16 +03:00
Evgeniy Khramtsov
cab8005bf3 Display muc#roomconfig_changesubject in room's disco#info
Fixes #2449
2018-06-01 08:56:56 +03:00
Evgeniy Khramtsov
0f9db50c8d Support for roomconfig_lang/roominfo_lang
Now room owners are able to set a preferred language
for the discussions in the room, so other users can
discover rooms based on the language they wish to talk.

TODO: the language format should conform to RFC 5646.
      This check should be implemented in 'xmpp' library.

Fixes #2436
2018-05-30 08:11:58 +03:00
Evgeniy Khramtsov
ca28faa51a Fix get_affiliation/2 2018-04-24 12:07:10 +03:00
Evgeniy Khramtsov
06ce884aa8 Add stubs for affiliation-specific backend callbacks 2018-04-23 11:35:43 +03:00
Evgeniy Khramtsov
63dba3fd64 Merge branch 'master' into muc-self-presence 2018-03-03 21:09:27 +03:00
Evgeniy Khramtsov
da1a5036fe Revert "Support for default values in default_room_opts"
This reverts commit 5054a9933f.
The commit is plain wrong: similar options are not required to
be in pair.
2018-03-03 21:08:05 +03:00
Badlop
5054a9933f Support for default values in default_room_opts 2018-02-26 17:22:37 +01:00
Evgeniy Khramtsov
0acc69e303 Use nicks in disco#items or disco#info report 2018-02-21 10:25:15 +03:00
Evgeniy Khramtsov
32e5a3255d Export aux functions from mod_muc_room 2018-02-16 08:28:33 +03:00
Evgeniy Khramtsov
ffe02c46e4 Let a MUC room to route presences from its bare JID
The goal for this is to provide entity capabilities (XEP-0115) and
vCard-based avatar hash (XEP-0153)
2018-02-12 17:37:36 +03:00
Evgeniy Khramtsov
2269d290d8 Switch to newer fast_xml and xmpp and update record fields in the code 2018-01-25 20:02:47 +03:00
Evgeniy Khramtsov
ba2b650464 Introduce new gen_mod callback: mod_options/1
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-23 10:54:52 +03:00
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