Badlop
2d32c66fd7
Update copyright to 2020 ( #3149 )
2020-01-28 15:49:23 +01:00
Paweł Chmielowski
75094df25e
Do not use ~ts format in string that are put in xmpp payload
...
We are expecting utf8 data here, and using that flag will convert those
to unicode codepoints, which aren't handled properly later.
2020-01-22 12:55:27 +01:00
Evgeny Khramtsov
47d0eed3f1
Advertise muc#roominfo_logs in disco#info of the room
...
The commit adds new `url` option for mod_muc_log.
Fixes #3040
2019-09-26 16:53:36 +03:00
Evgeny Khramtsov
5770946f03
Correctly handle unicode in log messages
2019-09-23 15:17:20 +03:00
Badlop
fd4c5edc23
Apply default role after revoking admin affiliation ( #3023 )
2019-09-17 12:31:14 +02:00
Vyache
c0f8e5d7c0
Custom exit message is not broadcast
2019-08-23 09:32:58 +03:00
Badlop
0bb14bdc0b
Revert "Affiliations other than admin and owner cannot invite to members_only rooms"
...
This reverts commit b010a1a0a0
.
More details in #2987
2019-08-13 14:55:37 +02:00
Evgeny Khramtsov
48bed43902
Don't render CAPTCHA whitelist when CAPTCHA is not configured
...
Fixes #2970
2019-07-31 12:35:06 +03:00
Evgeny Khramtsov
15b4b3fa1b
Fix typos using codespell
2019-07-16 22:07:39 +03:00
Evgeny Khramtsov
76d4c178a7
Use econf:timeout/2
2019-07-16 18:02:32 +03:00
Paweł Chmielowski
6b3d0d154e
Add code for hibernating inactive muc_room processes
2019-07-16 15:09:58 +02:00
Evgeny Khramtsov
104c4093dc
Only respond with occupants list to disco#items with empty node
...
Fixes #2942
2019-07-15 14:10:45 +03:00
Evgeny Khramtsov
4ec78736b9
Improve handling of unexpected iq in mod_muc_room
...
Don't crash on an iq-set/get containing unexpected tag within
expected namespace
This further improves PR #2900
2019-07-15 13:59:41 +03:00
Evgeny Khramtsov
87b8344ede
Attach mod_muc_room processes to a supervisor
2019-07-15 12:43:05 +03:00
Evgeny Khramtsov
b0379db5a1
Fix formatting
2019-07-10 23:46:42 +03:00
Evgeny Khramtsov
d1b5844d64
Merge pull request #2900 from aquarhead/protect-muc-owner
...
Protect against bad muc#owner requests
2019-07-10 23:46:08 +03:00
Evgeny Khramtsov
43da45cf67
Improve type specs of mod_muc_room
2019-07-09 15:21:17 +03:00
Evgeny Khramtsov
9cbc0685db
Don't expose internal FSM API of mod_muc_room
2019-07-09 00:47:54 +03:00
Evgeny Khramtsov
80beb6d6f6
Improve formatting of exceptions
2019-07-07 22:12:14 +03:00
Evgeny Khramtsov
b3caade0a0
Distribute routing of MUC messages accross all CPU cores
...
Also relay as less stanzas as possible through mod_muc workers
2019-07-05 10:35:31 +03:00
Evgeny Khramtsov
a2a061c1c8
Avoid using broad p1_queue:queue() type wherever possible
2019-06-28 22:16:29 +03:00
Evgeny Khramtsov
39cf8d86d6
Avoid using broad map() type wherever possible
2019-06-27 15:22:27 +03:00
Evgeny Khramtsov
b479fe5315
Use correct stacktrace in logging macros
...
By calling erlang:get_stacktrace() inside a lager function
we obtain actually a stacktrace of the lager function, not
the one we got during exception. This is not a problem for
newest Erlang versions though.
2019-06-26 00:05:41 +03:00
Paweł Chmielowski
7b35690bc9
Store muc_subscribers in process dict if get_subscribed_rooms not available
2019-06-25 16:41:47 +02:00
Evgeny Khramtsov
a3e0cbbdd8
Make logging messages more consistent
2019-06-24 20:32:34 +03:00
Evgeny Khramtsov
00f2a736eb
Improve extraction of translated strings
...
Now every such string MUST be encapsulated into ?T() macro.
The macro itself is defined in include/translate.hrl.
Example:
-module(foo).
-export([bar/1]).
-include("translate.hrl").
bar(Lang) ->
translate:translate(Lang, ?T("baz")).
2019-06-22 17:08:45 +03:00
Evgeny Khramtsov
a02cff0e78
Use new configuration validator
2019-06-14 12:33:26 +03:00
Paweł Chmielowski
d48c067681
Return jid_malformed error when sending presence without nick to conference
2019-06-13 18:42:02 +02:00
Evgeny Khramtsov
80b7d50628
Use system_time/1 instead of monotonic_time/1
...
The value of monotonic_time/1 may differ significantly between
nodes in a cluster due to different erlang:time_offset/0 values.
Thanks to Christoph Scholz for spotting this
2019-06-06 21:26:50 +03:00
LOU Xun
8d6455460d
Protect against bad muc#owner requests
2019-06-06 15:40:13 +00:00
Evgeny Khramtsov
3d8711f708
Avoid late arrival of get_disco_item response
2019-05-11 19:27:56 +03:00
Paweł Chmielowski
3d434cfcef
Handle get_subscribed_rooms call from mod_muc_room pid
...
Previously sometimes we tried to post message to all online rooms, and
if that was called from muc room pid, we were not able to process that
message for that room and send response, and this did lead to timeout.
2019-05-06 19:15:48 +02:00
Paweł Chmielowski
eac7a77b6a
Fix room state cleanup from db on change of persistent option change
2019-04-30 17:34:49 +02:00
Paweł Chmielowski
b83d30fd07
Make get_subscribed_rooms work even for non-persistant rooms
...
This will store info about non-persistant rooms in db, but rooms with that
that option enabled will not be restored on server restart.
This will save info about room only on subscribers change.
2019-04-30 13:41:03 +02:00
Paweł Chmielowski
17444ba84e
Allow non-moderator subscribers to get list of room subscribers
2019-04-25 14:52:47 +02:00
Paweł Chmielowski
875b2daff1
Add hook room_destroyed called when room gets destroyed
2019-04-17 18:56:25 +02:00
Paweł Chmielowski
c96a925fde
Add hooks for tracking mucsub subscriptions changes
2019-04-15 12:03:30 +02:00
Paweł Chmielowski
8e05fd1d24
Add option user_mucsub_from_muc_archive to mod_muc
...
This option disable storing separate mucsub message for each individual
subscriber but instead when user fetches archive virtual mucsub messages
are generated from muc archives.
2019-03-28 17:42:25 +01:00
Paweł Chmielowski
063869603a
Include id in mucsub notification message
2019-03-28 14:43:28 +01:00
Paweł Chmielowski
5077d39600
Add check for ljid when setting up subscribers
2019-03-14 15:54:51 +01:00
Evgeny Khramtsov
0715e62a41
Use jid() instead of ljid()
2019-03-14 14:34:15 +03:00
Paweł Chmielowski
538f35d05a
Replace code using p1_time_compat wrapper with native functions
...
Since we now require R19, we shouldn't need that anymore.
There are still couple places where p1_time_compat:unique_timestamp() is
used as there is no direct equivalent.
2019-02-27 09:56:31 +01:00
Paweł Chmielowski
77ac0584ed
Remove now() calls that sneaked in in pull requests
2019-02-27 09:56:31 +01:00
Badlop
e18522f74c
Once just_created isn't true, use it to keep room process creation ( #2787 )
2019-02-11 16:56:33 +01:00
Paweł Chmielowski
ea32d3f02c
Send mucsub subscriber notification events with from set to room jid
2019-02-11 13:04:06 +01:00
AquarHEAD Lou
3f3e04812b
Rename two presence functions
...
send_self_presence is actually implementing XEP-0115, while
send_initial_presence is implementing the "self-presence" step as
described in XEP-0045
2019-01-27 16:48:05 +00:00
Paweł Chmielowski
9e0baef233
Make last commit compile on R19
2019-01-22 14:40:01 +01:00
Paweł Chmielowski
74731a5816
Make sure that room_destroyed is called even when some code throws in terminate
...
We observed that some code was throwing exception in muc_room:terminate()
and that make this room not properly unregister itself from muc_online
table.
2019-01-22 14:22:23 +01:00
Christophe Romain
e4067df85e
Merge pull request #2748 from area-42/add_acl_for_mam_in_mod_muc
...
add acl for mam in mod_muc
2019-01-10 14:29:02 +01:00
Badlop
55417dfb37
Update copyright to 2019 ( #2756 )
2019-01-08 22:53:27 +01:00