Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip ci] Update some mods' docs - part 2 #1310

Merged
merged 5 commits into from
May 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions doc/developers-guide/mod_muc_light_developers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ All source files can be found in `apps/ejabberd/src`.

* `mod_muc_light_utils.erl`
Utilities shared by other MUC Light modules.
It includes the room configuration processing or the affiliation logic.
It includes the room configuration processing and the affiliation logic.

The header file can be found in `apps/ejabberd/include`.

Expand All @@ -61,28 +61,30 @@ There are 2 test suites and one helper module in `test/ejabberd_tests/tests`.
Provides handy iterators over room participants.
Used in MUC Light suites but in the future could be used in `muc_SUITE` as well.

Hooks used by this extension
Hooks handled by this extension
-----------------------

* `offline_groupchat_message_hook` used by `mod_muc_light:prevent_service_unavailable/3` - Prevents the default behaviour of sending `service-unavailable` error to the room when a groupchat message is sent to an offline occupant.
* `offline_groupchat_message_hook` handled by `mod_muc_light:prevent_service_unavailable/3` - Prevents the default behaviour of sending `service-unavailable` error to the room when a groupchat message is sent to an offline occupant.

* `remove_user` used by `mod_muc_light:remove_user/2` - Triggers DB cleanup of all data related to the removed user.
* `remove_user` handled by `mod_muc_light:remove_user/2` - Triggers DB cleanup of all data related to the removed user.
Includes a broadcast of a notification about user removal from occupied rooms.

* `disco_local_items` used by `mod_muc_light:get_muc_service/5` - Adds MUC service item to the Disco result.
* `disco_local_items` handled by `mod_muc_light:get_muc_service/5` - Adds MUC service item to the Disco result.
Uses either a MUC Light or a classic MUC namespace when the legacy mode is enabled.

* `roster_get` used by `mod_muc_light:add_rooms_to_roster/2` - Injects room items to the user's roster.
* `roster_get` handled by `mod_muc_light:add_rooms_to_roster/2` - Injects room items to the user's roster.

* `privacy_iq_get`, `privacy_iq_set` used by `mod_muc_light:process_iq_get/5` and `mod_muc_light:process_iq_set/4` respectively - These callbacks handle blocking settings when legacy mode is enabled.
* `privacy_iq_get`, `privacy_iq_set` handled by `mod_muc_light:process_iq_get/5` and `mod_muc_light:process_iq_set/4` respectively - These callbacks handle blocking settings when legacy mode is enabled.

* `is_muc_room_owner`, `muc_room_pid` used by `mod_muc_light:is_room_owner/3` and `mod_muc_light:muc_room_pid/2` respectively - Callbacks that provide essential data for the `mod_mam_muc` extension.
* `is_muc_room_owner`, `muc_room_pid`, `can_access_room`, `can_access_identity` used by `mod_muc_light:is_room_owner/3`, `mod_muc_light:muc_room_pid/2`, `mod_muc_light:can_access_room/3` and `mod_muc_light:can_access_identity/3` respectively - Callbacks that provide essential data for the `mod_mam_muc` extension.

Hooks executed by this extension
-----------------------

* `filter_room_packet` by codecs - Allows `mod_mam_muc` to archive groupchat messages.

* `room_send_packet` by codecs - Handled by `mod_aws_sns`.

* `forget_room` by `mod_muc_light_db_mnesia` and `mod_muc_light_room` - It is a part of `mod_mam_muc` integration as well.
A hook used for MAM cleanup upon room destruction.

Expand Down
10 changes: 5 additions & 5 deletions doc/modules/mod_admin_extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
This module significantly extends `mongooseimctl` script capabilities. New functionalities appear as additional commands. For detailed description, just run `mongooseimctl` script with no parameters.

### Options
* `submods`: List of function groups added by `mod_admin_extra`. Allowed elements:
* `node`: Adds `load_config`, `get_cookie`, `remove_node`
* `submods` (default: all submodules): List of function groups added by `mod_admin_extra`. Allowed elements:
* `accounts`: Adds `change_password`, `check_password_hash`, `delete_old_users`, `delete_old_users_vhost`, `ban_account`, `num_active_users`, `check_account`, `check_password`
* `sessions`: Adds `num_resources`, `resource_num`, `kick_session`, `status_num_host`, `status_num`, `status_list_host`, `status_list`, `connected_users_info`, `connected_users_vhost`, `user_sessions_info`, `set_presence`
* `vcard`: Adds `get_vcard`, `get_vcard2`, `get_vcard2_multi`, `set_vcard`, `set_vcard2`, `set_vcard2_multi`
* `roster`: Adds `add_rosteritem`, `delete_rosteritem`, `process_rosteritems`, `get_roster`, `push_roster`, `push_roster_all`, `push_roster_alltoall`
* `last`: Adds `set_last`
* `node`: Adds `load_config`, `get_cookie`, `remove_node`
* `private`: Adds `private_get`, `private_set`
* `roster`: Adds `add_rosteritem`, `delete_rosteritem`, `process_rosteritems`, `get_roster`, `push_roster`, `push_roster_all`, `push_roster_alltoall`
* `sessions`: Adds `num_resources`, `resource_num`, `kick_session`, `status_num_host`, `status_num`, `status_list_host`, `status_list`, `connected_users_info`, `connected_users_vhost`, `user_sessions_info`, `set_presence`
* `stanza`: Adds `send_message_chat`, `send_message_headline`, `send_stanza_c2s`
* `stats`: Adds `stats`, `stats_host`
* `vcard`: Adds `get_vcard`, `get_vcard2`, `get_vcard2_multi`, `set_vcard`, `set_vcard2`, `set_vcard2_multi`

### Example configuration
` {mod_admin_extra, [{submods, [node, accounts, sessions]}]} `
3 changes: 2 additions & 1 deletion doc/modules/mod_http_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ Currently, the module supports only the S3 backend using [AWS Signature Version

### Options

* **iqdisc** (default: `one_queue`)
* **host** (string, default: `"upload.@HOST@"`): Subdomain for the upload service to reside under. `@HOST@` is replaced with each served domain.
* **backend** (atom, default: `s3`) - Backend to use for generating slots. Currently only `s3` can be used.
* **expiration_time** (integer, default: `60`) - Duration (in seconds) after which the generated `PUT` URL will become invalid.
* **token_bytes** (integer, default: `32`) - Number of random bytes of a token that will be used in a generated URL.
The text representation of the token will be twice as long as the number of bytes, e.g. for the default value the token in URL will be 64 characters long.
* **max_file_size** (integer, default: 10 MB) - Maximum file size (in bytes) accepted by the module. Disabled if set to `undefined`.
* **max_file_size** (integer, default: 10485760 (10 MB)) - Maximum file size (in bytes) accepted by the module. Disabled if set to `undefined`.
* **s3** (list, default: unset) - Options specific to S3 backend.

#### S3 backend options
Expand Down
19 changes: 12 additions & 7 deletions doc/modules/mod_muc.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This module implements [XEP-0045: Multi-User Chat](http://xmpp.org/extensions/xe
It's a common XMPP group chat solution.
This extension consists of two Erlang modules: `mod_muc` and `mod_muc_room`, the latter being the room code itself.
Note that only `mod_muc` needs to be enabled in the configuration file.
Also `mod_muc_log` is a logging submodule.
Also `mod_muc_log` is a logging submodule.

### Options
* `host` (string, default: `"conference.@HOST@"`): Subdomain for MUC service to reside under.
Expand All @@ -21,23 +21,23 @@ Also `mod_muc_log` is a logging submodule.
* `max_room_desc` (atom or positive integer, default: `infinite`): Maximum room description length.
* `min_message_interval` (non-negative integer, default: 0): Minimal interval (in seconds) between messages processed by the room.
* `min_presence_interval` (non-negative integer, default: 0): Minimal interval (in seconds) between presences processed by the room.
* `max_user` (positive integer, default: 200): Absolute maximum user count per room on the node.
* `max_users_admin_threshold` (positive integer, default: 5): Absolute maximum administrator count per room on the node.
* `max_users` (positive integer, default: 200): Absolute maximum user count per room on the node.
* `max_users_admin_threshold` (positive integer, default: 5): When the server checks if a new user can join a room and they are an admin, `max_users_admin_threshold` is added to `max_users` during occupant limit check.
* `user_message_shaper` (atom, default: `none`): Shaper for user messages processed by a room (global for the room).
* `user_presence_shaper` (atom, default: `none`): Shaper for user presences processed by a room (global for the room).
* `max_user_conferences` (non-negative, default: 10): Specifies the number of rooms that a user can occupy simultaneously.
* `http_auth_pool` (atom, default: `none`): If an external HTTP service is chosen to check passwords for password-protected rooms, this option specifies the HTTP pool name to use (see [External HTTP Authentication](#external-http-authentication) below).
* `hibernate_timeout` (timeout, default: `90000`): Timeout (in milliseconds) defining the inactivity period after which the room's process should be hibernated.
* `hibernated_room_check_interval` (timeout, default: `infinity`): Interval defining how often the hibernated rooms will be checked.
* `hibernated_room_timeout` (timeout, default: `inifitniy`): A time after which a hibernated room is stopped (deeply hibernated).
* `hibernated_room_check_interval` (timeout, default: `infinity`): Interval defining how often the hibernated rooms will be checked (a timer is global for a node).
* `hibernated_room_timeout` (timeout, default: `inifitniy`): A time after which a hibernated room is stopped (deeply hibernated).
See [MUC performance optimisation](#performance-optimisations).
* `default_room_options` (list of key-value tuples, default: `[]`): List of room configuration options to be overridden in the initial state.
* `title` (binary, default: `<<>>`): Room title, short free text.
* `description` (binary, default: `<<>>`): Room description, long free text.
* `allow_change_subj` (boolean, default: `true`): Allow all occupants to change the room subject.
* `allow_query_users` (boolean, default: `true`): Allow occupants to send IQ queries to other occupants.
* `allow_private_messages` (boolean, default: `true`): Allow private messaging between occupants.
* `allow_visitor_status` (boolean, default: `true`): Allow occupants to use text statuses in presences.
* `allow_visitor_status` (boolean, default: `true`): Allow occupants to use text statuses in presences.
When disabled, text is removed by the room before broadcasting.
* `allow_visitor_nickchange` (boolean, default: `true`): Allow occupants to change nicknames.
* `public` (boolean, default: `true`): Room is included in the list available via Service Discovery.
Expand All @@ -47,13 +47,18 @@ Also `mod_muc_log` is a logging submodule.
* `members_by_default` (boolean, default: `true`): All new occupants are members by default, unless they have a different affiliation assigned.
* `members_only` (boolean, default: `false`): Only users with a member affiliation can join the room.
* `allow_user_invites` (boolean, default: `false`): Allow ordinary members to send mediated invitations.
* `allow_multiple_sessions` (boolean, default: `false`): Allow multiple user session to use the same nick.
* `password_protected` (boolean, default: `false`): Room is protected with a password.
* `password` (binary, default: `<<>>`): Room password is required upon joining.
This option has no effect when `password_protected` is `false`.
* `anonymous` (boolean, default: `true`): Room is anonymous, meaning occupants can't see each others real JIDs, except for the room moderators.
* `max_users` (positive integer, default: 200): Maximum user count per room.
Admins and the room owner are not affected.
* `logging` (boolean, default: `false`): Enables logging of room events (messages, presences) to a file on the disk. Uses `mod_muc_log`.
* `maygetmemberlist` (list of atoms, default: `[]`): A list of roles and/or privileges that enable retrieving the room's member list.
* `affiliations` (list of `{{<<"user">>, <<"server">>, <<"resource">>}, affiliation}` tuples, default: `[]`): A default list of affiliations set for every new room.
* `subject` (binary, default: `<<>>`): A default subject for new room.
* `subject_author` (binary, default: `<<>>`): A nick name of the default subject's author.


### Example Configuration
Expand Down Expand Up @@ -83,7 +88,7 @@ This optimisation works only for persistent rooms as only these can be restored
The improvement works as follows:
1. All room processes are traversed at a chosen `hibernated_room_check_interval`.
1. If a `hibernated_room_timeout` is exceeded, a "stop" signal is sent to a unused room.
1. The room's process is stopped only if there is no online users or if the only one is its owner.
1. The room's process is stopped only if there are no online users or if the only one is its owner.
If the owner is online, a presence of a type unavailable is sent to it indicating that the room's process is being terminated.

The room's process can be recreated on demand, for example when a presence sent to it, or the owner wants to add more users to the room.
Expand Down
4 changes: 2 additions & 2 deletions doc/modules/mod_muc_light.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Module Description

This module implements [XEP Multi-User Chat Light](https://github.com/xsf/xeps/pull/118) (still being reviewed by XMPP community).
It's an experimental XMPP group chat solution.
This module implements [Multi-User Chat Light](../open-extensions/muc_light.md).
It's an experimental XMPP group chat solution.
This extension consists of several modules but only `mod_muc_light` needs to be enabled in the config file.

### Options
Expand Down
4 changes: 2 additions & 2 deletions doc/modules/mod_muc_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It writes room-related information (configuration) and events (messages, presenc
### Options

* `outdir` (string, default: `"www/muc"`): Filesystem directory where the files are stored.
* `access_log` (atom, default: `muc_admin`):
* `access_log` (atom, default: `muc_admin`): ACL that defines who can enable/disable logging for specific rooms.
* `dirtype` (atom, default: `subdirs`): Specifies the log directory structure.
* `subdirs`: Module will use the following directory structure `[Logs root]/[dirname]/YYYY/MM/` with file names being `DD.[extension]`.
* `plain`: Module will use the following directory structure `[Logs root]/[dirname]/` with file names being `YYYY-MM-DD.[extension]`.
Expand All @@ -18,7 +18,7 @@ It writes room-related information (configuration) and events (messages, presenc
* `plaintext`: Just a text file, better suited for processing than HTML.
* `css_file` (binary or atom, default: `false`):
* `false`: Uses default styles for HTML logs.
* `<<"path to custom CSS file">>`: Links custom CSS inside HTML logs.
* `<<"path to custom CSS file">>`: Links custom CSS inside HTML logs. Please note it won't be copied to the logs directory but the given path will be linked in HTML files instead.
* `timezone` (atom, default: `local`):
* `local`: Uses the local server timezone in dates written into the logs.
* `universal`: Uses GMT in dates written into the logs.
Expand Down
Loading