Commit Graph

144 Commits

Author SHA1 Message Date
Badlop 6e0161470e Update newest copyright year to 2021 (#3464) 2021-01-27 17:02:06 +01:00
Paweł Chmielowski b977320091 Don't fetch subscribers list in room_unused_* 2021-01-26 11:13:23 +01:00
Paweł Chmielowski 5212b0aaa6 Validate affiliations in set_room_affiliation command 2021-01-21 14:20:30 +01:00
Badlop ac24d6ee9f Fix typo in case clause detected by Dialyzer 2020-12-18 20:40:17 +01:00
Paweł Chmielowski 9f851008f6 Update spec for get_room_pid 2020-12-18 12:36:31 +01:00
Paweł Chmielowski 2ab7da1e8f Use better fallback value for room activity time when skipping room in decide_room 2020-12-17 09:55:12 +01:00
Paweł Chmielowski a9ed26e484 Fix getting age of newly created rooms in rooms_unused_* 2020-12-14 09:47:25 +01:00
Paweł Chmielowski 0c09599d7b Normalize names passed to destroy_room 2020-12-08 09:19:29 +01:00
Paweł Chmielowski 5f9d480f6a Simplify updating disk room options in set_room_affiliation 2020-12-04 13:06:53 +01:00
Paweł Chmielowski 02cc212f16 Fix typo in last commit 2020-12-01 15:39:17 +01:00
Paweł Chmielowski 0fe64674ee Make decide room better handle rooms that were just hibernated 2020-12-01 15:30:23 +01:00
Paweł Chmielowski 9e1f3862cb Fix room_unused_destroy on hibernated rooms 2020-11-19 09:31:14 +01:00
Paweł Chmielowski c2a3f037bb Update muc_room just_created timestamp when message is received
This together with last history message is used by room_unused_* command
to determine for how long room was not used, this change allow us to skip
checking history, and works even when history is disabled.
2020-11-18 17:14:28 +01:00
Paweł Chmielowski bf1aacefcb We don't use persistent field in decide_room 2020-11-18 16:49:43 +01:00
Paweł Chmielowski e306cb0797 Fix logic that determines room age when history_size=0 2020-11-18 16:49:43 +01:00
Paweł Chmielowski 2e8023158d Allow room_unused_list/destroy work on hibernated rooms
This required adding hibernation time to data stored for room to be able
determine how old was a room, rooms that aren't stored with that
information will use node start time as timestamp for that.
2020-11-16 16:05:16 +01:00
Paweł Chmielowski 7655e10ba4 Add better error reporting to mod_muc_admin commands 2020-10-20 17:57:19 +02:00
Badlop b64fff1faa Document that send_direct_invitation is asynchronous 2020-10-16 15:24:58 +02:00
Paweł Chmielowski 73dbd34f95 Store room options in create_room_with_opts only if we will start room
Previously we could overwrite existing room options and then later return
error because room was already started.
2020-10-15 16:24:50 +02:00
Jerome Sautret 6bbae4cea2 send_direct_invitation command is now asynchronous
EJABS-3593
2020-10-15 11:40:22 +02:00
Paweł Chmielowski 73f8aded17 Make mod_muc_admin command work correctly with hibernated rooms
This should first try to unhibernate rooms before trying to send messages
to processes handling them.
2020-10-13 13:00:57 +02:00
Stu Tomlinson bd11a00f8f
Use include_lib() to include headers from dependencies (#3369) 2020-09-03 13:45:57 +02:00
Badlop ff92dab49e Parse also ServerHost in create_room* commands (#3326) 2020-07-10 13:06:05 +02:00
Badlop d7d8085d3b Fix most EDoc errors, even if that's not used nowadays apparently 2020-05-11 19:53:13 +02:00
Badlop edf5b3c7f0 Don't use string:take, as it isn't available in Erlang/OTP 19.3 (#3256) 2020-05-07 16:09:51 +02:00
Badlop e5a2d42484 Fix webadmin muc room sorting broken due to trailing slash patch (#3256) 2020-05-07 11:22:43 +02:00
Badlop 78f0439e78 Make a few more strings translatable in MUC and Shared Roster WebAdmin 2020-04-20 20:24:56 +02:00
Badlop 101f7a6d63 Check if mod_muc_log is enabled before setting logging option (#3215) 2020-04-17 16:19:58 +02:00
Badlop b7c088d4b0 Update links to the ejabberd Docs page in WebAdmin 2020-04-14 13:59:11 +02:00
Paweł Chmielowski 9a89b360c0
fix command rooms_empty_destroy (#3183) 2020-03-05 11:41:51 +01:00
Badlop 5574b21dd6 Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore 2020-02-07 13:32:49 +01:00
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 97da380acd Generate ejabberd.yml.5 man page from source code directly
Several documentation callbacks (doc/0 and mod_doc/0) are implemented
and `ejabberdctl man` command is added to generate a man page. Note
that the command requires a2x to be installed (which is a part of
asciidoc package).
2020-01-08 12:24:51 +03:00
Badlop 20205c66c1 Support custom base path in WebAdmin by using relative URLs (#3043) 2019-10-02 12:42:54 +02:00
Evgeny Khramtsov 5770946f03 Correctly handle unicode in log messages 2019-09-23 15:17:20 +03:00
Badlop e50ecf9e96 Fix some links to Guide in WebAdmin and add new ones (#3003) 2019-08-27 15:41:37 +02:00
Badlop a1dfb7fbe6 Improve rooms_* commands to accept 'global' as MUC service argument (#2976) 2019-08-12 17:03:32 +02:00
Badlop dd8c468de3 Rename MUC command arguments from Host to Service (#2976) 2019-08-08 12:32:59 +02:00
Evgeny Khramtsov 15b4b3fa1b Fix typos using codespell 2019-07-16 22:07:39 +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 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 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
Badlop 6545d55473 Fix crash in mod_muc_admin:web_page_main/2 caused by just_created (#2830) 2019-03-18 17:11:00 +01: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
Holger Weiss 3491fa3fea mod_muc_admin: Fix indentation 2019-02-23 23:50:14 +01:00
Christoph Scholz dd7754bc59 only destroy rooms if mam is enabled
when using ejabberdctl rooms_empty_list or rooms_empty_destroy only
select rooms that are have mam enabled. Otherwise you may accidently
destroy rooms which seem to be unsused due to archive being empty
2019-02-23 22:48:15 +01:00
Christoph Scholz f987db5a39 check if mod_mam is loaded before calling mod_mam:is_empty_for_room 2019-02-18 13:42:45 +01:00