Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9bd1b39f9f | |||
| 20a01a25e4 | |||
| 68e69debff | |||
| 7a333eecbe | |||
| e274bcc87d | |||
| c42cb2bbac | |||
| 9ee7054823 | |||
| 65e16dcac1 | |||
| 97c2d6a29d | |||
| 93cdee80ed | |||
| 11055f61a6 | |||
| af99799e8a | |||
| 926f60b2ed | |||
| 0fdbb03f54 | |||
| bd0332c716 | |||
| 45007809f6 | |||
| 0e0fdb440c | |||
| 2016cf547f | |||
| ead87e3727 | |||
| f56739fd9f | |||
| c5f2b389c3 | |||
| 4cc95dda42 | |||
| 0bfbe3e154 | |||
| 9bd6b11007 | |||
| c013a59d16 | |||
| aa02c4de1e | |||
| fb9e2b9603 | |||
| a70bdc0776 | |||
| 936460212f | |||
| 8ac51e63b5 | |||
| 090a8e3c95 | |||
| 101cce0c1e | |||
| a935302a19 | |||
| 9a0ff13cc2 | |||
| ef933c07cc | |||
| df5291e4bd | |||
| 7a8c0331c1 | |||
| 28e37bcaad | |||
| 8a3344e78a | |||
| ce95f1f25a | |||
| f1739ce34d | |||
| 1add1de23b | |||
| e25bdba16d | |||
| 7c63cd1000 | |||
| 4192190a96 | |||
| a733ba311c | |||
| fe472a63a0 | |||
| 25b78b73d0 | |||
| b978a47925 | |||
| b44b1304b8 | |||
| a4fd756eae | |||
| 8d4c1e3617 | |||
| 54f5db851d | |||
| 35042ebc6a | |||
| 6c2dfd3d31 | |||
| 543b874a10 | |||
| 4258d3dc24 | |||
| 949649e3a9 | |||
| 82d95ac81d | |||
| 3124644315 |
+86
-31
@@ -1,3 +1,58 @@
|
||||
## Version 24.07
|
||||
|
||||
#### Core
|
||||
|
||||
- `ejabberd_options`: Add trailing `@` to `@VERSION@` parsing
|
||||
- `mod_http_api`: Fix problem parsing tuples when using OTP 27 json library ([#4242](https://github.com/processone/ejabberd/issues/4242))
|
||||
- `mod_http_api`: Restore args conversion of `{"k":"v"}` to tuple lists
|
||||
- `mod_matrix_gw`: Add misc:json_encode_With_kv_lists and use it in matrix sign function
|
||||
- `mod_muc`: Output `muc#roominfo_avatarhash` in room disco info as per updated XEP-0486 ([#4234](https://github.com/processone/ejabberd/issues/4234))
|
||||
- `mod_muc`: Improve cross version handling of muc retractions
|
||||
- `node_pep`: Add missing feature `item-ids` to node_pep
|
||||
- `mod_register`: Send welcome message as `chat` too ([#4246](https://github.com/processone/ejabberd/issues/4246))
|
||||
- `ejabberd_hooks`: Support for ejabberd hook subscribers, useful for [mod_prometheus](https://github.com/processone/ejabberd-contrib/tree/master/mod_prometheus)
|
||||
- `ejabberd.app`: Don't add `iex` to included_applications
|
||||
- `make-installers`: Fix path in scripts in regular user install ([#4258](https://github.com/processone/ejabberd/issues/4258))
|
||||
- Test: New tests for API commands
|
||||
|
||||
#### Documentation
|
||||
|
||||
- `mod_matrix_gw`: Fix `matrix_id_as_jid` option documentation
|
||||
- `mod_register`: Add example configuration of `welcome_message` option
|
||||
- `mix.exs`: Add ejabberd example config files to the hex package
|
||||
- Update `CODE_OF_CONDUCT.md`
|
||||
|
||||
#### ext_mod
|
||||
|
||||
- Fetch dependencies from hex.pm when mix is available
|
||||
- files_to_path is deprecated, use compile_to_path
|
||||
- Compile all Elixir files in a library with one function call
|
||||
- Improve error result when problem compiling elixir file
|
||||
- Handle case when contrib module has no `*.ex` and no `*.erl`
|
||||
- `mix.exs`: Include Elixir's Logger in the OTP release, useful for [mod_libcluster](https://github.com/processone/ejabberd-contrib/tree/master/mod_libcluster)
|
||||
|
||||
#### Logs
|
||||
|
||||
- Print message when starting ejabberd application fails
|
||||
- Use error_logger when printing startup failure message
|
||||
- Use proper format depending on the formatter ([#4256](https://github.com/processone/ejabberd/issues/4256))
|
||||
|
||||
#### SQL
|
||||
|
||||
- Add option `update_sql_schema_timeout` to allow schema update use longer timeouts
|
||||
- Add ability to specify custom timeout for sql operations
|
||||
- Allow to configure number of restart in `sql_transaction()`
|
||||
- Make sql query in testsuite compatible with pg9.1
|
||||
- In `mysql.sql`, fix update instructions for the `archive` table, `origin_id` column ([#4259](https://github.com/processone/ejabberd/issues/4259))
|
||||
|
||||
#### WebAdmin
|
||||
|
||||
- `ejabberd.yml.example`: Add `api_permissions` group for webadmin ([#4249](https://github.com/processone/ejabberd/issues/4249))
|
||||
- Don't use host from url in webadmin, prefer host used for authentication
|
||||
- Fix number of accounts shown in the online-users page
|
||||
- Fix crash when viewing old shared roster groups ([#4245](https://github.com/processone/ejabberd/issues/4245))
|
||||
- Support groupid with spaces when making shared roster result ([#4245](https://github.com/processone/ejabberd/issues/4245))
|
||||
|
||||
## Version 24.06
|
||||
|
||||
#### Core
|
||||
@@ -5,49 +60,49 @@
|
||||
- `econf`: Add ability to use additional custom errors when parsing options
|
||||
- `ejabberd_logger`: Reloading configuration will update logger settings
|
||||
- `gen_mod`: Add support to specify a hook global, not vhost-specific
|
||||
- [`mod_configure`](https://docs.ejabberd.im/admin/configuration/modules/#mod_configure): Retract `Get User Password` command to update [XEP-0133](https://xmpp.org/extensions/xep-0133.html) 1.3.0
|
||||
- [`mod_conversejs`](https://docs.ejabberd.im/admin/configuration/modules/#mod_conversejs): Simplify support for `@HOST@` in `default_domain` option ([#4167](https://github.com/processone/issues/4167))
|
||||
- [`mod_mam`](https://docs.ejabberd.im/admin/configuration/modules/#mod_mam): Document that [XEP-0441](https://xmpp.org/extensions/xep-0441.html) is implemented as well
|
||||
- [`mod_mam`](https://docs.ejabberd.im/admin/configuration/modules/#mod_mam): Update support for [XEP-0425](https://xmpp.org/extensions/xep-0425.html) version 0.3.0, keep supporting 0.2.1 ([#4193](https://github.com/processone/issues/4193))
|
||||
- [`mod_matrix_gw`](https://docs.ejabberd.im/admin/configuration/modules/#mod_matrix_gw): Fix support for `@HOST@` in `matrix_domain` option ([#4167](https://github.com/processone/issues/4167))
|
||||
- [`mod_muc_log`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_log): Hide join/leave lines, add method to show them
|
||||
- [`mod_muc_log`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_log): Support `allowpm` introduced in 2bd61ab
|
||||
- [`mod_muc_room`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_room): Use ejabberd hooks instead of function calls to `mod_muc_log` ([#4191](https://github.com/processone/issues/4191))
|
||||
- [`mod_private`](https://docs.ejabberd.im/admin/configuration/modules/#mod_private): Cope with bookmark decoding errors
|
||||
- [`mod_vcard_xupdate`](https://docs.ejabberd.im/admin/configuration/modules/#mod_vcard_xupdate): Send hash after avatar get set for first time
|
||||
- `prosody2ejabberd`: Handle the `approved` attribute. As feature isn't implemented, discard it ([#4188](https://github.com/processone/issues/4188))
|
||||
- `mod_configure`: Retract `Get User Password` command to update XEP-0133 1.3.0
|
||||
- `mod_conversejs`: Simplify support for `@HOST@` in `default_domain` option ([#4167](https://github.com/processone/ejabberd/issues/4167))
|
||||
- `mod_mam`: Document that XEP-0441 is implemented as well
|
||||
- `mod_mam`: Update support for XEP-0425 version 0.3.0, keep supporting 0.2.1 ([#4193](https://github.com/processone/ejabberd/issues/4193))
|
||||
- `mod_matrix_gw`: Fix support for `@HOST@` in `matrix_domain` option ([#4167](https://github.com/processone/ejabberd/issues/4167))
|
||||
- `mod_muc_log`: Hide join/leave lines, add method to show them
|
||||
- `mod_muc_log`: Support `allowpm` introduced in 2bd61ab
|
||||
- `mod_muc_room`: Use ejabberd hooks instead of function calls to `mod_muc_log` ([#4191](https://github.com/processone/ejabberd/issues/4191))
|
||||
- `mod_private`): Cope with bookmark decoding errors
|
||||
- `mod_vcard_xupdate`: Send hash after avatar get set for first time
|
||||
- `prosody2ejabberd`: Handle the `approved` attribute. As feature isn't implemented, discard it ([#4188](https://github.com/processone/ejabberd/issues/4188))
|
||||
|
||||
#### SQL
|
||||
|
||||
- [`update_sql_schema`](https://docs.ejabberd.im/admin/configuration/toplevel/#update_sql_schema): Enable this option by default
|
||||
- `update_sql_schema`: Enable this option by default
|
||||
- CI: Don't load database schema files for mysql and pgsql
|
||||
- Support Unix Domain Socket with updated p1_pgsql and p1_mysql ([#3716](https://github.com/processone/issues/3716))
|
||||
- Support Unix Domain Socket with updated p1_pgsql and p1_mysql ([#3716](https://github.com/processone/ejabberd/issues/3716))
|
||||
- Fix handling of `mqtt_pub` table definition from `mysql.sql` and fix `should_update_schema/1` in `ejabberd_sql_schema.erl`
|
||||
- Don't start sql connection pools for unknown hosts
|
||||
- Add `update_primary_key` command to sql schema updater
|
||||
- Fix crash running [`export2sql`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#export2sql) when MAM enabled but MUC disabled
|
||||
- Fix crash running `export2sql` when MAM enabled but MUC disabled
|
||||
- Improve detection of types in odbc
|
||||
|
||||
#### Commands API
|
||||
|
||||
- New ban commands use private storage to keep ban information ([#4201](https://github.com/processone/issues/4201))
|
||||
- [`join_cluster_here`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#join_cluster_here): New command to join a remote node into our local cluster
|
||||
- Don't name integer and string results in API examples ([#4198](https://github.com/processone/issues/4198))
|
||||
- [`get_user_subscriptions`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#get_user_subscriptions): Fix validation of user field in that command
|
||||
- [`mod_admin_extra`](https://docs.ejabberd.im/admin/configuration/modules/#mod_admin_extra): Handle case when `mod_private` is not enabled ([#4201](https://github.com/processone/issues/4201))
|
||||
- [`mod_muc_admin`](https://docs.ejabberd.im/admin/configuration/modules/#mod_muc_admin): Improve validation of arguments in several commands
|
||||
- New ban commands use private storage to keep ban information ([#4201](https://github.com/processone/ejabberd/issues/4201))
|
||||
- `join_cluster_here`: New command to join a remote node into our local cluster
|
||||
- Don't name integer and string results in API examples ([#4198](https://github.com/processone/ejabberd/issues/4198))
|
||||
- `get_user_subscriptions`: Fix validation of user field in that command
|
||||
- `mod_admin_extra`: Handle case when `mod_private` is not enabled ([#4201](https://github.com/processone/ejabberd/issues/4201))
|
||||
- `mod_muc_admin`: Improve validation of arguments in several commands
|
||||
|
||||
#### Compile
|
||||
|
||||
- `ejabberdctl`: Comment ERTS_VSN variable when not used ([#4194](https://github.com/processone/issues/4194))
|
||||
- `ejabberdctl`: Comment ERTS_VSN variable when not used ([#4194](https://github.com/processone/ejabberd/issues/4194))
|
||||
- `ejabberdctl`: Fix iexlive after `make prod` when using Elixir
|
||||
- `ejabberdctl`: If `INET_DIST_INTERFACE` is IPv6, set required option ([#4189](https://github.com/processone/issues/4189))
|
||||
- `ejabberdctl`: If `INET_DIST_INTERFACE` is IPv6, set required option ([#4189](https://github.com/processone/ejabberd/issues/4189))
|
||||
- `ejabberdctl`: Make native dynamic node names work when using fully qualified domain names
|
||||
- `rebar.config.script`: Support relaxed dependency version ([#4192](https://github.com/processone/issues/4192))
|
||||
- `rebar.config.script`: Support relaxed dependency version ([#4192](https://github.com/processone/ejabberd/issues/4192))
|
||||
- `rebar.config`: Update deps version to rebar3's relaxed versioning
|
||||
- `rebar.lock`: Track file, now that rebar3 uses loose dependency versioning
|
||||
- `configure.ac`: When using rebar3, unlock dependencies that are disabled ([#4212](https://github.com/processone/issues/4212))
|
||||
- `configure.ac`: When using rebar3 with old Erlang, unlock some dependencies ([#4213](https://github.com/processone/issues/4213))
|
||||
- `configure.ac`: When using rebar3, unlock dependencies that are disabled ([#4212](https://github.com/processone/ejabberd/issues/4212))
|
||||
- `configure.ac`: When using rebar3 with old Erlang, unlock some dependencies ([#4213](https://github.com/processone/ejabberd/issues/4213))
|
||||
- `mix:exs`: Move `xmpp` from `included_applications` to `applications`
|
||||
|
||||
#### Dependencies
|
||||
@@ -57,7 +112,7 @@
|
||||
- Jiffy: Use Json module when Erlang/OTP 27, jiffy with older ones
|
||||
- Jose: Update to the new 1.11.10 for Erlang/OTP higher than 23
|
||||
- Luerl: Update to 1.2.0 when OTP same or higher than 20, simplifies commit a09f222
|
||||
- P1_acme: Update to support Jose 1.11.10 and Ipv6 support ([#4170](https://github.com/processone/issues/4170))
|
||||
- P1_acme: Update to support Jose 1.11.10 and Ipv6 support ([#4170](https://github.com/processone/ejabberd/issues/4170))
|
||||
- P1_acme: Update to use Erlang's json library instead of jiffy when OTP 27
|
||||
- Port_compiler: Update to 1.15.0 that supports Erlang/OTP 27.0
|
||||
|
||||
@@ -89,7 +144,7 @@
|
||||
- make-binaries: Bump OpenSSL to 3.3.1
|
||||
- make-binaries: Bump Linux-PAM to 1.6.1
|
||||
- make-binaries: Bump Expat to 2.6.2
|
||||
- make-binaries: Revert temporarily an OTP commit that breaks MSSQL ([#4178](https://github.com/processone/issues/4178))
|
||||
- make-binaries: Revert temporarily an OTP commit that breaks MSSQL ([#4178](https://github.com/processone/ejabberd/issues/4178))
|
||||
- CONTAINER.md: Invalid `CTL_ON_CREATE` usage in docker-compose example
|
||||
|
||||
#### WebAdmin
|
||||
@@ -116,8 +171,8 @@
|
||||
- Support tls-exporter channel binding
|
||||
- Support XEP-0474: SASL SCRAM Downgrade Protection
|
||||
- Fix presenting features and returning results of inline bind2 elements
|
||||
- [`disable_sasl_scram_downgrade_protection`](https://docs.ejabberd.im/admin/configuration/toplevel/#disable-sasl-scram-downgrade-protection): New option to disable XEP-0474
|
||||
- [`negotiation_timeout`](https://docs.ejabberd.im/admin/configuration/toplevel/#negotiation-timeout): Increase default value from 30s to 2m
|
||||
- `disable_sasl_scram_downgrade_protection`: New option to disable XEP-0474
|
||||
- `negotiation_timeout`: Increase default value from 30s to 2m
|
||||
- mod_carboncopy: Teach how to interact with bind2 inline requests
|
||||
|
||||
#### Other:
|
||||
@@ -155,10 +210,10 @@
|
||||
- ejabberdctl: Rework temporary node name generation
|
||||
- ejabberdctl: Print argument description, examples and note in help
|
||||
- ejabberdctl: Document exclusive ejabberdctl commands like all the others
|
||||
- Commands: Add a new [`muc_sub`](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/#muc-sub) tag to all the relevant commands
|
||||
- Commands: Add a new `muc_sub` tag to all the relevant commands
|
||||
- Commands: Improve syntax of many commands documentation
|
||||
- Commands: Use list arguments in many commands that used separators
|
||||
- Commands: [`set_presence`](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#set-presence): switch priority argument from string to integer
|
||||
- Commands: `set_presence`: switch priority argument from string to integer
|
||||
- ejabberd_commands: Add the command API version as [a tag `vX`](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/#v1)
|
||||
- ejabberd_ctl: Add support for list and tuple arguments
|
||||
- ejabberd_xmlrpc: Fix support for restuple error response
|
||||
|
||||
@@ -22,6 +22,21 @@ Examples of unacceptable behavior by participants include:
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Guidelines for Respectful and Efficient Communication on Issues, Discussions, and PRs
|
||||
|
||||
To ensure that our maintainers can efficiently manage issues and provide timely updates, we kindly ask that all comments on GitHub tickets remain relevant to the topic of the issue. Please avoid posting comments solely to ping maintainers or ask for updates. If you need information on the status of an issue, consider the following:
|
||||
|
||||
- **Check the Issue Timeline:** Review the existing comments and updates on the issue before posting.
|
||||
- **Use Reactions:** If you want to show that you are interested in an issue, use GitHub's reaction feature (e.g., thumbs up) instead of commenting.
|
||||
- **Be Patient:** Understand that maintainers may be working on multiple tasks and will provide updates as soon as possible.
|
||||
|
||||
Additionally, please be aware that:
|
||||
|
||||
- **User Responses:** Users who report issues may no longer be using the software, may have switched to other projects, or may simply be busy. It is their right not to respond to follow-up questions or comments.
|
||||
- **Maintainer Priorities:** Maintainers have the right to define their own priorities and schedule. They will address issues based on their availability and the project's needs.
|
||||
|
||||
By following these guidelines, you help us maintain a productive and respectful environment for everyone involved.
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 24.06` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
|
||||
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 24.07` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
|
||||
REQUIRE_ERLANG_MIN="9.0.5 (Erlang/OTP 20.0)"
|
||||
REQUIRE_ERLANG_MAX="100.0.0 (No Max)"
|
||||
|
||||
|
||||
@@ -111,10 +111,13 @@ access_rules:
|
||||
|
||||
api_permissions:
|
||||
"console commands":
|
||||
from:
|
||||
- ejabberd_ctl
|
||||
from: ejabberd_ctl
|
||||
who: all
|
||||
what: "*"
|
||||
"webadmin commands":
|
||||
from: ejabberd_web_admin
|
||||
who: admin
|
||||
what: "*"
|
||||
"admin access":
|
||||
who:
|
||||
access:
|
||||
|
||||
+54
-25
@@ -2,12 +2,12 @@
|
||||
.\" Title: ejabberd.yml
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
||||
.\" Date: 06/27/2024
|
||||
.\" Date: 07/18/2024
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "EJABBERD\&.YML" "5" "06/27/2024" "\ \&" "\ \&"
|
||||
.TH "EJABBERD\&.YML" "5" "07/18/2024" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -82,12 +82,12 @@ All options can be changed in runtime by running \fIejabberdctl reload\-config\f
|
||||
.sp
|
||||
Some options can be specified for particular virtual host(s) only using \fIhost_config\fR or \fIappend_host_config\fR options\&. Such options are called \fIlocal\fR\&. Examples are \fImodules\fR, \fIauth_method\fR and \fIdefault_db\fR\&. The options that cannot be defined per virtual host are called \fIglobal\fR\&. Examples are \fIloglevel\fR, \fIcertfiles\fR and \fIlisten\fR\&. It is a configuration mistake to put \fIglobal\fR options under \fIhost_config\fR or \fIappend_host_config\fR section \- ejabberd will refuse to load such configuration\&.
|
||||
.sp
|
||||
It is not recommended to write ejabberd\&.yml from scratch\&. Instead it is better to start from "default" configuration file available at https://github\&.com/processone/ejabberd/blob/24\&.06/ejabberd\&.yml\&.example\&. Once you get ejabberd running you can start changing configuration options to meet your requirements\&.
|
||||
It is not recommended to write ejabberd\&.yml from scratch\&. Instead it is better to start from "default" configuration file available at https://github\&.com/processone/ejabberd/blob/24\&.07/ejabberd\&.yml\&.example\&. Once you get ejabberd running you can start changing configuration options to meet your requirements\&.
|
||||
.sp
|
||||
Note that this document is intended to provide comprehensive description of all configuration options that can be consulted to understand the meaning of a particular option, its format and possible values\&. It will be quite hard to understand how to configure ejabberd by reading this document only \- for this purpose the reader is recommended to read online Configuration Guide available at https://docs\&.ejabberd\&.im/admin/configuration\&.
|
||||
.SH "TOP LEVEL OPTIONS"
|
||||
.sp
|
||||
This section describes top level options of ejabberd 24\&.06\&. The options that changed in this version are marked with 🟤\&.
|
||||
This section describes top level options of ejabberd 24\&.07\&. The options that changed in this version are marked with 🟤\&.
|
||||
.PP
|
||||
\fBaccess_rules\fR: \fI{AccessName: {allow|deny: ACLRules|ACLName}}\fR
|
||||
.RS 4
|
||||
@@ -1150,7 +1150,7 @@ This option can be used to tune tick time parameter of
|
||||
Whether to use
|
||||
\fInew\fR
|
||||
SQL schema\&. All schemas are located at
|
||||
https://github\&.com/processone/ejabberd/tree/24\&.06/sql\&. There are two schemas available\&. The default legacy schema stores one XMPP domain into one ejabberd database\&. The
|
||||
https://github\&.com/processone/ejabberd/tree/24\&.07/sql\&. There are two schemas available\&. The default legacy schema stores one XMPP domain into one ejabberd database\&. The
|
||||
\fInew\fR
|
||||
schema can handle several XMPP domains in a single ejabberd database\&. Using this
|
||||
\fInew\fR
|
||||
@@ -1772,7 +1772,7 @@ or
|
||||
if the latter is not set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBsql_server 🟤\fR: \fIHost | IP Address | ODBC Connection String | Unix Socket Path\fR
|
||||
\fBsql_server\fR: \fIHost | IP Address | ODBC Connection String | Unix Socket Path\fR
|
||||
.RS 4
|
||||
\fINote\fR
|
||||
about this option: improved in 24\&.06\&. The hostname or IP address of the SQL server\&. For
|
||||
@@ -1855,13 +1855,19 @@ to allow all proxies, or specify a list of IPs, possibly with masks\&. The defau
|
||||
header if you enable this option as, otherwise, the client can set it itself and as a result the IP value cannot be trusted for security rules in ejabberd\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBupdate_sql_schema 🟤\fR: \fItrue | false\fR
|
||||
\fBupdate_sql_schema\fR: \fItrue | false\fR
|
||||
.RS 4
|
||||
\fINote\fR
|
||||
about this option: updated in 24\&.06\&. Allow ejabberd to update SQL schema\&. This option was added in ejabberd 23\&.10, and enabled by default since 24\&.06\&. The default value is
|
||||
\fItrue\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBupdate_sql_schema_timeout 🟤\fR: \fItimeout()\fR
|
||||
.RS 4
|
||||
\fINote\fR
|
||||
about this option: added in 24\&.07\&. Time allocated to SQL schema update queries\&. The default value is set to 5 minutes\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBuse_cache\fR: \fItrue | false\fR
|
||||
.RS 4
|
||||
Enable or disable cache\&. The default is
|
||||
@@ -1913,7 +1919,12 @@ seconds\&.
|
||||
.RE
|
||||
.SH "MODULES"
|
||||
.sp
|
||||
This section describes modules options of ejabberd 24\&.06\&. The modules that changed in this version are marked with 🟤\&.
|
||||
This section describes modules options of ejabberd 24\&.07\&. The modules that changed in this version are marked with 🟤\&.
|
||||
.SS "Elixir\&.ModPresenceDemo"
|
||||
.sp
|
||||
This is just a demonstration\&.
|
||||
.sp
|
||||
The module has no options\&.
|
||||
.SS "mod_adhoc"
|
||||
.sp
|
||||
This module implements XEP\-0050: Ad\-Hoc Commands\&. It\(cqs an auxiliary module and is only needed by some of the other modules\&.
|
||||
@@ -1946,7 +1957,7 @@ Details for some commands:
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fIban\-acount\fR: This command kicks all the connected sessions of the account from the server\&. It also changes their password to a randomly generated one, so they can\(cqt login anymore unless a server administrator changes their password again\&. It is possible to define the reason of the ban\&. The new password also includes the reason and the date and time of the ban\&. See an example below\&.
|
||||
\fIban_account\fR: This command kicks all the connected sessions of the account from the server\&. It also changes their password to a randomly generated one, so they can\(cqt login anymore unless a server administrator changes their password again\&. It is possible to define the reason of the ban\&. The new password also includes the reason and the date and time of the ban\&. See an example below\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@@ -1971,7 +1982,7 @@ or similar\&. If you use other Operating System, place the file on the same dire
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fIsrg\-create\fR: If you want to put a group Name with blankspaces, use the characters "\*(Aq and \*(Aq" to define when the Name starts and ends\&. See an example below\&.
|
||||
\fIsrg_create\fR: If you want to put a group Name with blank spaces, use the characters "\*(Aq and \*(Aq" to define when the Name starts and ends\&. See an example below\&.
|
||||
.RE
|
||||
.sp
|
||||
The module has no options\&.
|
||||
@@ -2025,19 +2036,19 @@ With this call, the sessions of the local account which JID is boby@example\&.or
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
ejabberdctl vhost example\&.org ban\-account boby "Spammed rooms"
|
||||
ejabberdctl vhost example\&.org ban_account boby "Spammed rooms"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
Call to srg\-create using double\-quotes and single\-quotes:
|
||||
Call to srg_create using double\-quotes and single\-quotes:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
ejabberdctl srg\-create g1 example\&.org "\*(AqGroup number 1\*(Aq" this_is_g1 g1
|
||||
ejabberdctl srg_create g1 example\&.org "\*(AqGroup number 1\*(Aq" this_is_g1 g1
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -3541,7 +3552,7 @@ option, but applied to this module only\&.
|
||||
.PP
|
||||
\fBuser_mucsub_from_muc_archive\fR: \fItrue | false\fR
|
||||
.RS 4
|
||||
When this option is disabled, for each individual subscriber a separa mucsub message is stored\&. With this option enabled, when a user fetches archive virtual mucsub, messages are generated from muc archives\&. The default value is
|
||||
When this option is disabled, for each individual subscriber a separate mucsub message is stored\&. With this option enabled, when a user fetches archive virtual mucsub, messages are generated from muc archives\&. The default value is
|
||||
\fIfalse\fR\&.
|
||||
.RE
|
||||
.RE
|
||||
@@ -3590,11 +3601,11 @@ is replaced with the hostname\&. The default value is
|
||||
\fBmatrix_id_as_jid\fR: \fItrue | false\fR
|
||||
.RS 4
|
||||
If set to
|
||||
\fIfalse\fR, all packets failing to be delivered via an XMPP server\-to\-server connection will then be routed to the Matrix gateway by translating a Jabber ID
|
||||
\fItrue\fR, all packets failing to be delivered via an XMPP server\-to\-server connection will then be routed to the Matrix gateway by translating a Jabber ID
|
||||
\fIuser@matrixdomain\&.tld\fR
|
||||
to a Matrix user identifier
|
||||
\fI@user:matrixdomain\&.tld\fR\&. When set to
|
||||
\fItrue\fR, messages must be explicitly sent to the matrix gateway service Jabber ID to be routed to a remote Matrix server\&. In this case, to send a message to Matrix user
|
||||
\fIfalse\fR, messages must be explicitly sent to the matrix gateway service Jabber ID to be routed to a remote Matrix server\&. In this case, to send a message to Matrix user
|
||||
\fI@user:matrixdomain\&.tld\fR, the client must send a message to the JID
|
||||
\fIuser%\fR\fImatrixdomain\&.tld@matrix\&.myxmppdomain\fR\fI\&.tld\fR, where
|
||||
\fImatrix\&.myxmppdomain\&.tld\fR
|
||||
@@ -4405,7 +4416,7 @@ This option defines the number of service admins or room owners allowed to enter
|
||||
.PP
|
||||
\fBmax_users_presence\fR: \fINumber\fR
|
||||
.RS 4
|
||||
This option defines after how many users in the room, it is considered overcrowded\&. When a MUC room is considered overcrowed, presence broadcasts are limited to reduce load, traffic and excessive presence "storm" received by participants\&. The default value is
|
||||
This option defines after how many users in the room, it is considered overcrowded\&. When a MUC room is considered overcrowded, presence broadcasts are limited to reduce load, traffic and excessive presence "storm" received by participants\&. The default value is
|
||||
\fI1000\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
@@ -5013,9 +5024,9 @@ This option defines which access rule will be enforced to limit the maximum numb
|
||||
.PP
|
||||
\fBbounce_groupchat\fR: \fItrue | false\fR
|
||||
.RS 4
|
||||
This option is use the disable an optimisation that avoids bouncing error messages when groupchat messages could not be stored as offline\&. It will reduce chat room load, without any drawback in standard use cases\&. You may change default value only if you have a custom module which uses offline hook after
|
||||
This option is use the disable an optimization that avoids bouncing error messages when groupchat messages could not be stored as offline\&. It will reduce chat room load, without any drawback in standard use cases\&. You may change default value only if you have a custom module which uses offline hook after
|
||||
\fImod_offline\fR\&. This option can be useful for both standard MUC and MucSub, but the bounce is much more likely to happen in the context of MucSub, so it is even more important to have it on large MucSub services\&. The default value is
|
||||
\fIfalse\fR, meaning the optimisation is enabled\&.
|
||||
\fIfalse\fR, meaning the optimization is enabled\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBcache_life_time\fR: \fItimeout()\fR
|
||||
@@ -5949,7 +5960,7 @@ modules:
|
||||
.RE
|
||||
.SS "mod_push"
|
||||
.sp
|
||||
This module implements the XMPP server\(cqs part of the push notification solution specified in XEP\-0357: Push Notifications\&. It does not generate, for example, APNS or FCM notifications directly\&. Instead, it\(cqs designed to work with so\-called "app servers" operated by third\-party vendors of mobile apps\&. Those app servers will usually trigger notification delivery to the user\(cqs mobile device using platform\-dependant backend services such as FCM or APNS\&.
|
||||
This module implements the XMPP server\(cqs part of the push notification solution specified in XEP\-0357: Push Notifications\&. It does not generate, for example, APNS or FCM notifications directly\&. Instead, it\(cqs designed to work with so\-called "app servers" operated by third\-party vendors of mobile apps\&. Those app servers will usually trigger notification delivery to the user\(cqs mobile device using platform\-dependent backend services such as FCM or APNS\&.
|
||||
.sp
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
@@ -6176,6 +6187,24 @@ Set a welcome message that is sent to each newly registered account\&. The messa
|
||||
\fISubject\fR
|
||||
and text
|
||||
\fIBody\fR\&.
|
||||
.sp
|
||||
\fBExample\fR:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
modules:
|
||||
mod_register:
|
||||
welcome_message:
|
||||
subject: "Welcome!"
|
||||
body: |\-
|
||||
Hi!
|
||||
Welcome to this XMPP server
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.RE
|
||||
.SS "mod_register_web"
|
||||
@@ -7119,7 +7148,7 @@ The protocol extension is deferred and seems like even a few clients that were s
|
||||
The module has no options\&.
|
||||
.SS "mod_stream_mgmt"
|
||||
.sp
|
||||
This module adds support for XEP\-0198: Stream Management\&. This protocol allows active management of an XML stream between two XMPP entities, including features for stanza acknowledgements and stream resumption\&.
|
||||
This module adds support for XEP\-0198: Stream Management\&. This protocol allows active management of an XML stream between two XMPP entities, including features for stanza acknowledgments and stream resumption\&.
|
||||
.sp
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
@@ -7131,7 +7160,7 @@ This module adds support for XEP\-0198: Stream Management\&. This protocol allow
|
||||
.PP
|
||||
\fBack_timeout\fR: \fItimeout()\fR
|
||||
.RS 4
|
||||
A time to wait for stanza acknowledgements\&. Setting it to
|
||||
A time to wait for stanza acknowledgments\&. Setting it to
|
||||
\fIinfinity\fR
|
||||
effectively disables the timeout\&. The default value is
|
||||
\fI1\fR
|
||||
@@ -7804,7 +7833,7 @@ Should the operating system be revealed or not\&. The default value is
|
||||
.RE
|
||||
.SH "LISTENERS"
|
||||
.sp
|
||||
This section describes listeners options of ejabberd 24\&.06\&.
|
||||
This section describes listeners options of ejabberd 24\&.07\&.
|
||||
.sp
|
||||
TODO
|
||||
.SH "AUTHOR"
|
||||
@@ -7812,13 +7841,13 @@ TODO
|
||||
ProcessOne\&.
|
||||
.SH "VERSION"
|
||||
.sp
|
||||
This document describes the configuration file of ejabberd 24\&.06\&. Configuration options of other ejabberd versions may differ significantly\&.
|
||||
This document describes the configuration file of ejabberd 24\&.07\&. Configuration options of other ejabberd versions may differ significantly\&.
|
||||
.SH "REPORTING BUGS"
|
||||
.sp
|
||||
Report bugs to https://github\&.com/processone/ejabberd/issues
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
Default configuration file: https://github\&.com/processone/ejabberd/blob/24\&.06/ejabberd\&.yml\&.example
|
||||
Default configuration file: https://github\&.com/processone/ejabberd/blob/24\&.07/ejabberd\&.yml\&.example
|
||||
.sp
|
||||
Main site: https://ejabberd\&.im
|
||||
.sp
|
||||
|
||||
@@ -47,7 +47,7 @@ defmodule Ejabberd.MixProject do
|
||||
:fast_tls, :fast_xml, :fast_yaml, :jose,
|
||||
:p1_utils, :stringprep, :syntax_tools, :yconf, :xmpp]
|
||||
++ cond_apps(),
|
||||
included_applications: [:mnesia, :os_mon,
|
||||
included_applications: [:mnesia, :os_mon, :logger,
|
||||
:cache_tab, :eimp, :mqtree, :p1_acme,
|
||||
:p1_oauth2, :pkix]
|
||||
++ cond_included_apps()]
|
||||
@@ -145,7 +145,7 @@ defmodule Ejabberd.MixProject do
|
||||
{:p1_utils, "~> 1.0"},
|
||||
{:pkix, "~> 1.0"},
|
||||
{:stringprep, ">= 1.0.26"},
|
||||
{:xmpp, ">= 1.8.2"},
|
||||
{:xmpp, ">= 1.8.3"},
|
||||
{:yconf, "~> 1.0"}]
|
||||
++ cond_deps()
|
||||
end
|
||||
@@ -209,6 +209,7 @@ defmodule Ejabberd.MixProject do
|
||||
[# These are the default files included in the package
|
||||
files: ["include", "lib", "priv", "sql", "src",
|
||||
"COPYING", "README.md",
|
||||
"ejabberd.yml.example", "config/runtime.exs",
|
||||
"mix.exs", "rebar.config", "rebar.config.script", "vars.config"],
|
||||
maintainers: ["ProcessOne"],
|
||||
licenses: ["GPL-2.0-or-later"],
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
"base64url": {:hex, :base64url, "1.0.1", "f8c7f2da04ca9a5d0f5f50258f055e1d699f0e8bf4cfdb30b750865368403cf6", [:rebar3], [], "hexpm", "f9b3add4731a02a9b0410398b475b33e7566a695365237a6bdee1bb447719f5c"},
|
||||
"cache_tab": {:hex, :cache_tab, "1.0.31", "e4097b50a6f373ab1e0a5f01bab0bef6626771a4cd6c93404ed6d54810e11fbc", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "8582b60a4a09b247ef86355ba9e07fce9e11edc0345a775c9171f971c72b6351"},
|
||||
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
|
||||
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
|
||||
"earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"},
|
||||
"eimp": {:hex, :eimp, "1.0.23", "aaf32efab061143403dadbaa63e699ef8e81702fbfa96fd436d5e9be4d6a8d3a", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "907c780023cb2893e4fc4bdbe6a4f02c355913862ac67f0ecc26605e816b628a"},
|
||||
"ejabberd_po": {:git, "https://github.com/processone/ejabberd-po.git", "6ef974cbc28e1a52d7a35fd4d9081d175d0ac10d", []},
|
||||
"epam": {:hex, :epam, "1.0.14", "aa0b85d27f4ef3a756ae995179df952a0721237e83c6b79d644347b75016681a", [:rebar3], [], "hexpm", "2f3449e72885a72a6c2a843f561add0fc2f70d7a21f61456930a547473d4d989"},
|
||||
"eredis": {:hex, :eredis, "1.2.0", "0b8e9cfc2c00fa1374cd107ea63b49be08d933df2cf175e6a89b73dd9c380de4", [:rebar3], [], "hexpm", "d9b5abef2c2c8aba8f32aa018203e0b3dc8b1157773b254ab1d4c2002317f1e1"},
|
||||
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
|
||||
"esip": {:hex, :esip, "1.0.53", "482786a79d8f5b0aefc60ca68b8c6c7f074f6ede2653705e4206c6779edc5a56", [:rebar3], [{:fast_tls, "1.1.20", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}, {:stun, "1.2.13", [hex: :stun, repo: "hexpm", optional: false]}], "hexpm", "a9a1bd5ea52b0e2d1b1d1fec5fb7f0301e90610db1ecfeb205a18cc4e1cb3fc7"},
|
||||
"ex_doc": {:hex, :ex_doc, "0.34.1", "9751a0419bc15bc7580c73fde506b17b07f6402a1e5243be9e0f05a68c723368", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d441f1a86a235f59088978eff870de2e815e290e44a8bd976fe5d64470a4c9d2"},
|
||||
"esip": {:hex, :esip, "1.0.54", "dae8fb8278fd3b2c0d38c2e832c4b8d26700eb239b9a42c8ea574fee76f5e76a", [:rebar3], [{:fast_tls, "1.1.21", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}, {:stun, "1.2.14", [hex: :stun, repo: "hexpm", optional: false]}], "hexpm", "8187af819d7259cdaddaf69726c239ef604c9b0b0298a5f2d3e687bf5e2237ee"},
|
||||
"ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"},
|
||||
"exsync": {:hex, :exsync, "0.4.1", "0a14fe4bfcb80a509d8a0856be3dd070fffe619b9ba90fec13c58b316c176594", [:mix], [{:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "cefb22aa805ec97ffc5b75a4e1dc54bcaf781e8b32564bf74abbe5803d1b5178"},
|
||||
"ezlib": {:hex, :ezlib, "1.0.13", "3c7f62862850a241159c10b218ecf580bce54d0890601b65144dacc2633be2b0", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "9ee62ab3f8ed55a0fd11a9569fcb8e458683f95575417272192b069f092abfbb"},
|
||||
"fast_tls": {:hex, :fast_tls, "1.1.20", "d6f12d9ae4fe57e880b144b912e735af89343a8463d39b7eb4be3f6ca6163879", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "d09a12472a56a34c5eecaaed33ea283f00fcdf9dc2e8282ecbaae827f13fc21b"},
|
||||
"fast_tls": {:hex, :fast_tls, "1.1.21", "65d7d547a09eefb37a1c0d04d8601fac4f3e6e2c1ede859a7787081670f9648d", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "131542913937025e48cd80aa81f00359686d5501b75621e72026a87b5229505b"},
|
||||
"fast_xml": {:hex, :fast_xml, "1.1.52", "0289daafbf1190b0e53b444d4885cccf41e4b05768d4b3acc76dd8d143668e10", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "795192390e06d2b65016a6990bbfa5727f4a26d2914808b1c3c9a32eedcd1bfd"},
|
||||
"fast_yaml": {:hex, :fast_yaml, "1.0.37", "f71d472fbf787ccd161b914d1eb486116a0f4f2e835337a378fbd31b59d2e74b", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "8de868721bf7e2172414f7d3148ede0f3c922b496455cd625dd5c4429515a769"},
|
||||
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
|
||||
@@ -27,13 +28,13 @@
|
||||
"p1_acme": {:hex, :p1_acme, "1.0.23", "791aef0f79dc7f768b228808250c349fa9ce585cd8779da50ca93106eb3394d0", [:rebar3], [{:base64url, "~> 1.0", [hex: :base64url, repo: "hexpm", optional: false]}, {:idna, "~> 6.0", [hex: :idna, repo: "hexpm", optional: false]}, {:jiffy, "~> 1.1.1", [hex: :jiffy, repo: "hexpm", optional: false]}, {:jose, "~> 1.11.10", [hex: :jose, repo: "hexpm", optional: false]}, {:yconf, "~> 1.0.15", [hex: :yconf, repo: "hexpm", optional: false]}], "hexpm", "8ce196f26e3d22ea10b7809122950465878c127f80767e325207aed7e8d0dd59"},
|
||||
"p1_mysql": {:hex, :p1_mysql, "1.0.24", "0ed1e098c5a4525032448c65a2715f30980aae725615a4d255fd25f26bb22507", [:rebar3], [], "hexpm", "f058865f64257f507a2c6a5aff369b1375dbcb30b3d4258dad4f1b3eaffb655f"},
|
||||
"p1_oauth2": {:hex, :p1_oauth2, "0.6.14", "1c5f82535574de87e2059695ac4b91f8f9aebacbc1c80287dae6f02552d47aea", [:rebar3], [], "hexpm", "1fd3ac474e43722d9d5a87c6df8d36f698ed87af7bb81cbbb66361451d99ae8f"},
|
||||
"p1_pgsql": {:hex, :p1_pgsql, "1.1.26", "d3c3748c3638a1d7db5644e4fc63a6da7614b3009e172ef92a01d0217c3bec65", [:rebar3], [{:xmpp, "~> 1.8.0", [hex: :xmpp, repo: "hexpm", optional: false]}], "hexpm", "85f230db530333106b8a1f9e5d5af032e6c3dd23b432e03d68e9d29013a6dcfc"},
|
||||
"p1_pgsql": {:hex, :p1_pgsql, "1.1.27", "883e335d82ac062de0bde7981f8250a2e632258bb7a47df839a4cbdcb3e971e6", [:rebar3], [{:xmpp, "~> 1.8.0", [hex: :xmpp, repo: "hexpm", optional: false]}], "hexpm", "8e4d1a7602cb68780e55d89dc5a9b2e1aaca3f4f1ee3d1a25f2f8c3d2364ffb9"},
|
||||
"p1_utils": {:hex, :p1_utils, "1.0.26", "67b0c4ac9fa3ba3ef563b31aa111b0a004439a37fac85e027f1c3617e1c7ec6c", [:rebar3], [], "hexpm", "d0379e8c1156b98bd64f8129c1de022fcca4f2fdb7486ce73bf0ed2c3376b04c"},
|
||||
"pkix": {:hex, :pkix, "1.0.10", "d3bfadf7b7cfe2a3636f1b256c9cce5f646a07ce31e57ee527668502850765a0", [:rebar3], [], "hexpm", "e02164f83094cb124c41b1ab28988a615d54b9adc38575f00f19a597a3ac5d0e"},
|
||||
"sqlite3": {:hex, :sqlite3, "1.1.15", "e819defd280145c328457d7af897d2e45e8e5270e18812ee30b607c99cdd21af", [:rebar3], [], "hexpm", "3c0ba4e13322c2ad49de4e2ddd28311366adde54beae8dba9d9e3888f69d2857"},
|
||||
"stringprep": {:hex, :stringprep, "1.0.30", "46cf0ff631b3e7328f61f20b454d59428d87738f25d709798b5dcbb9b83c23f1", [:rebar3], [{:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "f6fc9b3384a03877830f89b2f38580caf3f4a27448a4a333d6a8c3975c220b9a"},
|
||||
"stun": {:hex, :stun, "1.2.13", "c3e855f10f6b0c3ac150bce3d6c96c04a85207a3a5c7a7207876d8b36db2b0a4", [:rebar3], [{:fast_tls, "1.1.20", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "9cf4191491a60573ed6197e636530af1d25c9b064845aabed0c02f780d33ea3f"},
|
||||
"stun": {:hex, :stun, "1.2.14", "6f538ac80c842131dbd149055570d116bfabc9b5ebff4bd6af2e7888958c660c", [:rebar3], [{:fast_tls, "1.1.21", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:p1_utils, "1.0.26", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "e134807b1b7a8dffd94e64eefee00e65c7b4042f3d14e16f8f43566d20371583"},
|
||||
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
|
||||
"xmpp": {:hex, :xmpp, "1.8.2", "7c26fae7ca83b307bab99624595dce706d427a17eed9c6305980550f8120a3a3", [:rebar3], [{:ezlib, "~> 1.0.12", [hex: :ezlib, repo: "hexpm", optional: false]}, {:fast_tls, "~> 1.1.19", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:fast_xml, "~> 1.1.51", [hex: :fast_xml, repo: "hexpm", optional: false]}, {:idna, "~> 6.0", [hex: :idna, repo: "hexpm", optional: false]}, {:p1_utils, "~> 1.0.25", [hex: :p1_utils, repo: "hexpm", optional: false]}, {:stringprep, "~> 1.0.29", [hex: :stringprep, repo: "hexpm", optional: false]}], "hexpm", "53a9f85ad44103a358dc173225bc96d08076d4e78506f87d838337b2fa3b381f"},
|
||||
"xmpp": {:hex, :xmpp, "1.8.3", "acf39a8b70b066bb8f10b0862e031e8abcf92fe89d1c41d06c1e39ae5caf89c4", [:rebar3], [{:ezlib, "~> 1.0.12", [hex: :ezlib, repo: "hexpm", optional: false]}, {:fast_tls, "~> 1.1.19", [hex: :fast_tls, repo: "hexpm", optional: false]}, {:fast_xml, "~> 1.1.51", [hex: :fast_xml, repo: "hexpm", optional: false]}, {:idna, "~> 6.0", [hex: :idna, repo: "hexpm", optional: false]}, {:p1_utils, "~> 1.0.25", [hex: :p1_utils, repo: "hexpm", optional: false]}, {:stringprep, "~> 1.0.29", [hex: :stringprep, repo: "hexpm", optional: false]}], "hexpm", "ed70065f9a89a818dcff43b74c080c9e7f4f1414e1051beddb7280db809af711"},
|
||||
"yconf": {:hex, :yconf, "1.0.16", "d59521d66ff89f219411b6e9277cd6feec7cc6fce11554e67de02a8d0a470479", [:rebar3], [{:fast_yaml, "1.0.37", [hex: :fast_yaml, repo: "hexpm", optional: false]}], "hexpm", "e947813273f38711c7b2e5a8e4acc9a51c7bbe854f744a345f60300b38586c89"},
|
||||
}
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
{"leaves the room","surt de la sala"}.
|
||||
{"List of users with hats","Llista d'usuaris amb barrets"}.
|
||||
{"List users with hats","Llista d'usuaris amb barrets"}.
|
||||
{"Logged Out","Desconectat"}.
|
||||
{"Logging","Registre"}.
|
||||
{"Make participants list public","Crear una llista de participants pública"}.
|
||||
{"Make room CAPTCHA protected","Crear una sala protegida per CAPTCHA"}.
|
||||
@@ -437,6 +438,7 @@
|
||||
{"Set message of the day on all hosts and send to online users","Escriure missatge del dia en tots els hosts i enviar-ho als usuaris connectats"}.
|
||||
{"Shared Roster Groups","Grups de contactes compartits"}.
|
||||
{"Show Integral Table","Mostrar Taula Integral"}.
|
||||
{"Show Occupants Join/Leave","Mostrar Entrades/Eixides dels Ocupants"}.
|
||||
{"Show Ordinary Table","Mostrar Taula Ordinaria"}.
|
||||
{"Shut Down Service","Apager el Servei"}.
|
||||
{"SOCKS5 Bytestreams","SOCKS5 Bytestreams"}.
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
{"leaves the room","sale de la sala"}.
|
||||
{"List of users with hats","Lista de usuarios con sombreros"}.
|
||||
{"List users with hats","Listar usuarios con sombreros"}.
|
||||
{"Logged Out","Desconectad@"}.
|
||||
{"Logging","Histórico de mensajes"}.
|
||||
{"Make participants list public","La lista de participantes es pública"}.
|
||||
{"Make room CAPTCHA protected","Proteger la sala con CAPTCHA"}.
|
||||
@@ -437,6 +438,7 @@
|
||||
{"Set message of the day on all hosts and send to online users","Poner mensaje del día en todos los dominios y enviar a los usuarios conectados"}.
|
||||
{"Shared Roster Groups","Grupos Compartidos"}.
|
||||
{"Show Integral Table","Mostrar Tabla Integral"}.
|
||||
{"Show Occupants Join/Leave","Mostrar personas activas Entrar/Salir"}.
|
||||
{"Show Ordinary Table","Mostrar Tabla Ordinaria"}.
|
||||
{"Shut Down Service","Detener el servicio"}.
|
||||
{"SOCKS5 Bytestreams","SOCKS5 Bytestreams"}.
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
{"leaves the room","esce dalla stanza"}.
|
||||
{"List of users with hats","Elenco degli utenti con cappelli"}.
|
||||
{"List users with hats","Elenca gli utenti con cappelli"}.
|
||||
{"Logged Out","Disconnesso"}.
|
||||
{"Logging","Registrazione"}.
|
||||
{"Make participants list public","Rendere pubblica la lista dei partecipanti"}.
|
||||
{"Make room CAPTCHA protected","Rendere la stanza protetta da CAPTCHA"}.
|
||||
@@ -437,6 +438,7 @@
|
||||
{"Set message of the day on all hosts and send to online users","Impostare il messaggio del giorno (MOTD) su tutti gli host e inviarlo agli utenti online"}.
|
||||
{"Shared Roster Groups","Gruppi di liste di contatti comuni"}.
|
||||
{"Show Integral Table","Mostrare la tabella integrale"}.
|
||||
{"Show Occupants Join/Leave","Mostra gli occupanti che si uniscono/escono"}.
|
||||
{"Show Ordinary Table","Mostrare la tabella normale"}.
|
||||
{"Shut Down Service","Terminare il servizio"}.
|
||||
{"SOCKS5 Bytestreams","SOCKS5 flussi di byte"}.
|
||||
@@ -531,6 +533,7 @@
|
||||
{"Too many <list/> elements","Troppi elementi <list/>"}.
|
||||
{"Too many (~p) failed authentications from this IP address (~s). The address will be unblocked at ~s UTC","Troppe (~p) autenticazioni non riuscite da questo indirizzo IP (~s). L'indirizzo verrà sbloccato alle ~s UTC"}.
|
||||
{"Too many receiver fields were specified","Sono stati specificati troppi campi del ricevitore"}.
|
||||
{"Too many unacked stanzas","Troppe stanze non riconosciute"}.
|
||||
{"Too many users in this conference","Troppi utenti in questa conferenza"}.
|
||||
{"Traffic rate limit is exceeded","Limite di traffico superato"}.
|
||||
{"~ts's Offline Messages Queue","La Coda dei Messaggi Offline di ~ts"}.
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
{"leaves the room","Sair da sala"}.
|
||||
{"List of users with hats","Lista dos usuários com chapéus"}.
|
||||
{"List users with hats","Lista os usuários com chapéus"}.
|
||||
{"Logged Out","Desconectado"}.
|
||||
{"Logging","Registrando no log"}.
|
||||
{"Make participants list public","Tornar pública a lista de participantes"}.
|
||||
{"Make room CAPTCHA protected","Tornar protegida a senha da sala"}.
|
||||
@@ -437,6 +438,7 @@
|
||||
{"Set message of the day on all hosts and send to online users","Definir mensagem do dia em todos os hosts e enviar para os usuários online"}.
|
||||
{"Shared Roster Groups","Grupos Shared Roster"}.
|
||||
{"Show Integral Table","Mostrar Tabela Integral"}.
|
||||
{"Show Occupants Join/Leave","Mostrar a entrada e a saída de ocupantes"}.
|
||||
{"Show Ordinary Table","Mostrar Tabela Ordinária"}.
|
||||
{"Shut Down Service","Parar Serviço"}.
|
||||
{"SOCKS5 Bytestreams","Bytestreams SOCKS5"}.
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@
|
||||
{"Logging","Журналювання"}.
|
||||
{"Make participants list public","Зробити список учасників видимим всім"}.
|
||||
{"Make room CAPTCHA protected","Зробити кімнату захищеною капчею"}.
|
||||
{"Make room members-only","Кімната тільки для зареєтрованых учасників"}.
|
||||
{"Make room members-only","Кімната тільки для зареєтрованих учасників"}.
|
||||
{"Make room moderated","Зробити кімнату модерованою"}.
|
||||
{"Make room password protected","Зробити кімнату захищеною паролем"}.
|
||||
{"Make room persistent","Зробити кімнату постійною"}.
|
||||
|
||||
+147
-145
@@ -33,17 +33,17 @@
|
||||
{"Allow visitors to send private messages to","允许访客发送私信至"}.
|
||||
{"Allow visitors to send status text in presence updates","允许访客在在线状态更新中发送状态文本"}.
|
||||
{"Allow visitors to send voice requests","允许访客发送发言请求"}.
|
||||
{"An associated LDAP group that defines room membership; this should be an LDAP Distinguished Name according to an implementation-specific or deployment-specific definition of a group.","与定义群聊成员资格相关联的 LDAP 群组;按群组特定于实现或特定于部署的定义,应该是一个 LDAP 专有名称。"}.
|
||||
{"An associated LDAP group that defines room membership; this should be an LDAP Distinguished Name according to an implementation-specific or deployment-specific definition of a group.","与定义群聊成员资格相关联的 LDAP 组;根据组的特定实施或特定部署的定义,使用 LDAP 专有名称。"}.
|
||||
{"Announcements","公告"}.
|
||||
{"Answer associated with a picture","与图片相关的答案"}.
|
||||
{"Answer associated with a video","与视频相关的答案"}.
|
||||
{"Answer associated with speech","与讲话相关的答案"}.
|
||||
{"Answer to a question","问题的答案"}.
|
||||
{"Anyone in the specified roster group(s) may subscribe and retrieve items","指定花名册群组中的人可以订阅并检索内容项"}.
|
||||
{"Anyone may associate leaf nodes with the collection","任何人都可以将叶子节点与集合关联"}.
|
||||
{"Anyone in the specified roster group(s) may subscribe and retrieve items","指定花名册组中的任何人都可以订阅和检索项目"}.
|
||||
{"Anyone may associate leaf nodes with the collection","任何人都可以将叶节点与集合关联"}.
|
||||
{"Anyone may publish","任何人都可以发布"}.
|
||||
{"Anyone may subscribe and retrieve items","任何人都可以订阅和检索内容项"}.
|
||||
{"Anyone with a presence subscription of both or from may subscribe and retrieve items","对全部或来源进行了状态订阅的任何人均可订阅并检索内容项"}.
|
||||
{"Anyone with a presence subscription of both or from may subscribe and retrieve items","任何拥有 both 或 from 的在线状态订阅的用户都可以订阅和检索项目"}.
|
||||
{"Anyone with Voice","任何有发言权的人"}.
|
||||
{"Anyone","任何人"}.
|
||||
{"April","四月"}.
|
||||
@@ -82,7 +82,7 @@
|
||||
{"Chatroom is stopped","群聊已停止"}.
|
||||
{"Chatrooms","群聊"}.
|
||||
{"Choose a username and password to register with this server","请选择要在此服务器中注册的用户名和密码"}.
|
||||
{"Choose storage type of tables","请选择表单的存储类型"}.
|
||||
{"Choose storage type of tables","选择表的存储类型"}.
|
||||
{"Choose whether to approve this entity's subscription.","选择是否批准此实体的订阅。"}.
|
||||
{"City","城市"}.
|
||||
{"Client acknowledged more stanzas than sent by server","客户端确认的节数多于服务器发送的节数"}.
|
||||
@@ -94,7 +94,7 @@
|
||||
{"Country","国家/地区"}.
|
||||
{"Current Discussion Topic","当前讨论话题"}.
|
||||
{"Database failure","数据库失败"}.
|
||||
{"Database Tables Configuration at ","数据库表格配置位于 "}.
|
||||
{"Database Tables Configuration at ","数据库表配置在 "}.
|
||||
{"Database","数据库"}.
|
||||
{"December","十二月"}.
|
||||
{"Default users as participants","默认用户为参与者"}.
|
||||
@@ -103,21 +103,21 @@
|
||||
{"Delete User","删除用户"}.
|
||||
{"Deliver event notifications","传递事件通知"}.
|
||||
{"Deliver payloads with event notifications","用事件通知传递有效负载"}.
|
||||
{"Disc only copy","仅磁盘复制"}.
|
||||
{"Disc only copy","仅磁盘副本"}.
|
||||
{"Don't tell your password to anybody, not even the administrators of the XMPP server.","不要将密码告诉任何人,甚至是 XMPP 服务的管理员。"}.
|
||||
{"Dump Backup to Text File at ","将备份转储到位于以下位置的文本文件 "}.
|
||||
{"Dump to Text File","转储到文本文件"}.
|
||||
{"Duplicated groups are not allowed by RFC6121","按照 RFC6121 的规则,不允许有重复的群组"}.
|
||||
{"Dynamically specify a replyto of the item publisher","为项目发布者动态指定一个 replyto"}.
|
||||
{"Duplicated groups are not allowed by RFC6121","按照 RFC6121 的规则,不允许重复的组"}.
|
||||
{"Dynamically specify a replyto of the item publisher","动态指定项目发布者的 replyto"}.
|
||||
{"Edit Properties","编辑属性"}.
|
||||
{"Either approve or decline the voice request.","批准或拒绝发言请求。"}.
|
||||
{"ejabberd HTTP Upload service","ejabberd HTTP 上传服务"}.
|
||||
{"ejabberd MUC module","ejabberd MUC 模块"}.
|
||||
{"ejabberd Multicast service","ejabberd 多重映射服务"}.
|
||||
{"ejabberd Publish-Subscribe module","ejabberd 发布—订阅模块"}.
|
||||
{"ejabberd Publish-Subscribe module","ejabberd 发布–订阅模块"}.
|
||||
{"ejabberd SOCKS5 Bytestreams module","ejabberd SOCKS5 字节流模块"}.
|
||||
{"ejabberd vCard module","ejabberd vCard 模块"}.
|
||||
{"ejabberd Web Admin","ejabberd Web 管理员"}.
|
||||
{"ejabberd Web Admin","ejabberd Web 管理"}.
|
||||
{"ejabberd","ejabberd"}.
|
||||
{"Email Address","电子邮件地址"}.
|
||||
{"Email","电子邮件"}.
|
||||
@@ -134,14 +134,14 @@
|
||||
{"Enter the text you see","请输入您看到的文本"}.
|
||||
{"Erlang XMPP Server","Erlang XMPP 服务器"}.
|
||||
{"Exclude Jabber IDs from CAPTCHA challenge","从验证码挑战中排除 Jabber ID"}.
|
||||
{"Export all tables as SQL queries to a file:","将所有表以 SQL 查询语句导出到文件:"}.
|
||||
{"Export all tables as SQL queries to a file:","将所有表以 SQL 查询导出到文件:"}.
|
||||
{"Export data of all users in the server to PIEFXIS files (XEP-0227):","将服务器中所有用户的数据导出到 PIEFXIS 文件(XEP-0227):"}.
|
||||
{"Export data of users in a host to PIEFXIS files (XEP-0227):","将主机中用户的数据导出到 PIEFXIS 文件(XEP-0227):"}.
|
||||
{"External component failure","外部组件故障"}.
|
||||
{"External component timeout","外部组件超时"}.
|
||||
{"Failed to activate bytestream","激活字节流失败"}.
|
||||
{"Failed to extract JID from your voice request approval","无法从您的发言请求批准中提取 JID"}.
|
||||
{"Failed to map delegated namespace to external component","未能将代理命名空间映射到外部组件"}.
|
||||
{"Failed to extract JID from your voice request approval","无法从发言请求批准中提取 JID"}.
|
||||
{"Failed to map delegated namespace to external component","未能将委托命名空间映射到外部组件"}.
|
||||
{"Failed to parse HTTP response","HTTP 响应解析失败"}.
|
||||
{"Failed to process option '~s'","无法处理选项“~s”"}.
|
||||
{"Family Name","姓氏"}.
|
||||
@@ -149,7 +149,7 @@
|
||||
{"February","二月"}.
|
||||
{"File larger than ~w bytes","文件大于 ~w 字节"}.
|
||||
{"Fill in the form to search for any matching XMPP User","填写表单以搜索任何匹配的 XMPP 用户"}.
|
||||
{"Friday","星期五"}.
|
||||
{"Friday","周五"}.
|
||||
{"From ~ts","来自 ~ts"}.
|
||||
{"Full List of Room Admins","群聊管理员完整列表"}.
|
||||
{"Full List of Room Owners","群聊所有者完整列表"}.
|
||||
@@ -160,12 +160,12 @@
|
||||
{"Get Number of Registered Users","获取注册用户数"}.
|
||||
{"Get Pending","获取待处理"}.
|
||||
{"Get User Last Login Time","获取用户上次登录时间"}.
|
||||
{"Get User Statistics","获取用户统计"}.
|
||||
{"Get User Statistics","获取用户统计数据"}.
|
||||
{"Given Name","中间名"}.
|
||||
{"Grant voice to this person?","授予此用户发言权?"}.
|
||||
{"has been banned","已被封禁"}.
|
||||
{"has been kicked because of a system shutdown","因系统关机而被踢出"}.
|
||||
{"has been kicked because of an affiliation change","由于从属关系的改变而踢出"}.
|
||||
{"has been kicked because of a system shutdown","因系统关闭而被踢出"}.
|
||||
{"has been kicked because of an affiliation change","由于从属关系的更改而被踢出"}.
|
||||
{"has been kicked because the room has been changed to members-only","被踢出,因为群聊已更改为仅成员进入"}.
|
||||
{"has been kicked","已被踢出"}.
|
||||
{"Hat title","头衔标题"}.
|
||||
@@ -180,13 +180,13 @@
|
||||
{"Import user data from jabberd14 spool file:","从 jabberd14 Spool 文件导入用户数据:"}.
|
||||
{"Import User from File at ","从以下位置的文件导入用户 "}.
|
||||
{"Import users data from a PIEFXIS file (XEP-0227):","从 PIEFXIS 文件(XEP-0227)导入用户数据:"}.
|
||||
{"Import users data from jabberd14 spool directory:","从jabberd14 Spool目录导入用户数据:"}.
|
||||
{"Import Users from Dir at ","从以下位置目录导入用户 "}.
|
||||
{"Import users data from jabberd14 spool directory:","从 jabberd14 spool 目录导入用户数据:"}.
|
||||
{"Import Users from Dir at ","从以下位置的目录导入用户 "}.
|
||||
{"Import Users From jabberd14 Spool Files","从 jabberd14 Spool 文件导入用户"}.
|
||||
{"Improper domain part of 'from' attribute","“from”属性域名部分不正确"}.
|
||||
{"Improper message type","消息类型不正确"}.
|
||||
{"Incorrect CAPTCHA submit","提交的验证码不正确"}.
|
||||
{"Incorrect data form","数据形式不正确"}.
|
||||
{"Incorrect data form","数据表单不正确"}.
|
||||
{"Incorrect password","密码不正确"}.
|
||||
{"Incorrect value of 'action' attribute","“action”属性的值不正确"}.
|
||||
{"Incorrect value of 'action' in data form","数据表单中“action”的值不正确"}.
|
||||
@@ -202,11 +202,11 @@
|
||||
{"IP addresses","IP 地址"}.
|
||||
{"is now known as","现在昵称为"}.
|
||||
{"It is not allowed to send error messages to the room. The participant (~s) has sent an error message (~s) and got kicked from the room","不允许向此群聊发送错误消息。参与者(~s)发送了错误消息(~s),被踢出了群聊"}.
|
||||
{"It is not allowed to send private messages of type \"groupchat\"","不允许发送“群聊”类型的私信"}.
|
||||
{"It is not allowed to send private messages of type \"groupchat\"","不允许发送“groupchat”类型的私信"}.
|
||||
{"It is not allowed to send private messages to the conference","不允许向群聊发送私信"}.
|
||||
{"Jabber ID","Jabber ID"}.
|
||||
{"January","一月"}.
|
||||
{"JID normalization denied by service policy","JID 规范化被服务策略拒绝"}.
|
||||
{"JID normalization denied by service policy","服务策略拒绝 JID 规范化"}.
|
||||
{"JID normalization failed","JID 规范化失败"}.
|
||||
{"Joined MIX channels of ~ts","加入了 ~ts 的 MIX 频道"}.
|
||||
{"Joined MIX channels:","加入了 MIX 频道:"}.
|
||||
@@ -223,7 +223,8 @@
|
||||
{"leaves the room","离开群聊"}.
|
||||
{"List of users with hats","有头衔用户的列表"}.
|
||||
{"List users with hats","有头衔用户列表"}.
|
||||
{"Logging","正在记录"}.
|
||||
{"Logged Out","已登出"}.
|
||||
{"Logging","日志记录"}.
|
||||
{"Make participants list public","公开参与者列表"}.
|
||||
{"Make room CAPTCHA protected","让群聊受验证码保护"}.
|
||||
{"Make room members-only","让群聊仅成员进入"}.
|
||||
@@ -232,20 +233,20 @@
|
||||
{"Make room persistent","让群聊持续存在"}.
|
||||
{"Make room public searchable","让群聊可公开搜索"}.
|
||||
{"Malformed username","用户名格式不正确"}.
|
||||
{"MAM preference modification denied by service policy","MAM 偏好被服务策略拒绝"}.
|
||||
{"MAM preference modification denied by service policy","服务策略拒绝修改 MAM 首选项"}.
|
||||
{"March","三月"}.
|
||||
{"Max # of items to persist, or `max` for no specific limit other than a server imposed maximum","要持久化的最大项目数 #,或“max”表示除服务器施加的最大值之外没有特定限制"}.
|
||||
{"Max payload size in bytes","最大有效负载字节数"}.
|
||||
{"Max payload size in bytes","最大有效负载大小(字节)"}.
|
||||
{"Maximum file size","最大文件大小"}.
|
||||
{"Maximum Number of History Messages Returned by Room","群聊返回的聊天记录消息的最大值"}.
|
||||
{"Maximum number of items to persist","要持久化的最大项目数"}.
|
||||
{"Maximum Number of Occupants","最大占用人数"}.
|
||||
{"Maximum Number of Occupants","最大参与者人数"}.
|
||||
{"May","五月"}.
|
||||
{"Membership is required to enter this room","进入此群聊需要成员资格"}.
|
||||
{"Memorize your password, or write it in a paper placed in a safe place. In XMPP there isn't an automated way to recover your password if you forget it.","请记住密码,或将密码写在纸上,放在安全的地方。在 XMPP 中,如果您忘记密码,没有自动恢复密码的方法。"}.
|
||||
{"Mere Availability in XMPP (No Show Value)","XMPP 中的可用性(无显示值)"}.
|
||||
{"Message body","消息主体"}.
|
||||
{"Message not found in forwarded payload","转发的有效载荷中找不到消息"}.
|
||||
{"Message body","消息正文"}.
|
||||
{"Message not found in forwarded payload","在转发的有效负载中找不到消息"}.
|
||||
{"Messages from strangers are rejected","拒绝来自陌生人的消息"}.
|
||||
{"Messages of type headline","标题类型的消息"}.
|
||||
{"Messages of type normal","普通类型的消息"}.
|
||||
@@ -255,7 +256,7 @@
|
||||
{"Moderators Only","仅主持人"}.
|
||||
{"Moderator","主持人"}.
|
||||
{"Module failed to handle the query","模块无法处理查询"}.
|
||||
{"Monday","星期一"}.
|
||||
{"Monday","周一"}.
|
||||
{"Multicast","多重映射"}.
|
||||
{"Multiple <item/> elements are not allowed by RFC6121","按照 RFC6121,多个 <item/> 元素是不允许的"}.
|
||||
{"Multi-User Chat","多用户聊天"}.
|
||||
@@ -278,24 +279,24 @@
|
||||
{"No child elements found","没有找到子元素"}.
|
||||
{"No data form found","没有找到数据表单"}.
|
||||
{"No Data","没有数据"}.
|
||||
{"No features available","没有可用特征"}.
|
||||
{"No features available","没有可用功能"}.
|
||||
{"No <forwarded/> element found","未找到 <forwarded/> 元素"}.
|
||||
{"No hook has processed this command","没有任何钩子已处理此命令"}.
|
||||
{"No info about last activity found","未找到上次活动的信息"}.
|
||||
{"No hook has processed this command","没有钩子处理此命令"}.
|
||||
{"No info about last activity found","未找到有关上次活动的信息"}.
|
||||
{"No 'item' element found","未找到“item”元素"}.
|
||||
{"No items found in this query","在此查询中找不到任何项目"}.
|
||||
{"No limit","不限"}.
|
||||
{"No limit","没有限制"}.
|
||||
{"No module is handling this query","没有模块正在处理此查询"}.
|
||||
{"No node specified","未指定节点"}.
|
||||
{"No 'password' found in data form","在数据表单中找不到“password”"}.
|
||||
{"No 'password' found in this query","在此查询中找不到“password”"}.
|
||||
{"No 'path' found in data form","在数据表单中找不到“path”"}.
|
||||
{"No pending subscriptions found","未找到待处理的订阅"}.
|
||||
{"No privacy list with this name found","未找到带此名称的隐私列表"}.
|
||||
{"No private data found in this query","此查询中未发现私有数据"}.
|
||||
{"No running node found","没有找到运行中的节点"}.
|
||||
{"No privacy list with this name found","未找到具有此名称的隐私列表"}.
|
||||
{"No private data found in this query","在此查询中找不到专用数据"}.
|
||||
{"No running node found","找不到正在运行的节点"}.
|
||||
{"No services available","无可用服务"}.
|
||||
{"No statistics found for this item","未找到此项的统计数据"}.
|
||||
{"No statistics found for this item","未找到此项目的统计数据"}.
|
||||
{"No 'to' attribute found in the invitation","邀请中未找到“to”属性"}.
|
||||
{"Nobody","没有人"}.
|
||||
{"Node already exists","节点已存在"}.
|
||||
@@ -310,92 +311,92 @@
|
||||
{"Not allowed","不允许"}.
|
||||
{"Not Found","没有找到"}.
|
||||
{"Not subscribed","未订阅"}.
|
||||
{"Notify subscribers when items are removed from the node","当从节点删除内容条目时通知订阅者"}.
|
||||
{"Notify subscribers when the node configuration changes","当节点设置改变时通知订阅者"}.
|
||||
{"Notify subscribers when the node is deleted","当节点被删除时通知订阅者"}.
|
||||
{"Notify subscribers when items are removed from the node","从节点中移除项目时通知订阅者"}.
|
||||
{"Notify subscribers when the node configuration changes","节点配置更改时通知订阅者"}.
|
||||
{"Notify subscribers when the node is deleted","删除节点时通知订阅者"}.
|
||||
{"November","十一月"}.
|
||||
{"Number of answers required","所需答案数量"}.
|
||||
{"Number of occupants","占用人数"}.
|
||||
{"Number of occupants","参与者人数"}.
|
||||
{"Number of Offline Messages","离线消息数量"}.
|
||||
{"Number of online users","在线用户数"}.
|
||||
{"Number of registered users","注册用户数"}.
|
||||
{"Number of seconds after which to automatically purge items, or `max` for no specific limit other than a server imposed maximum","等待多少秒后自动清除项目,“max”表示除服务器施加的最大值外没有特定限制"}.
|
||||
{"Occupants are allowed to invite others","允许占用者邀请别人"}.
|
||||
{"Occupants are allowed to query others","允许占用者查询别人"}.
|
||||
{"Occupants May Change the Subject","占用者可以更改话题"}.
|
||||
{"Occupants are allowed to invite others","允许参与者邀请别人"}.
|
||||
{"Occupants are allowed to query others","允许参与者查询别人"}.
|
||||
{"Occupants May Change the Subject","参与者可以更改话题"}.
|
||||
{"October","十月"}.
|
||||
{"OK","确定"}.
|
||||
{"Old Password:","旧密码:"}.
|
||||
{"Online Users","在线用户"}.
|
||||
{"Online","在线"}.
|
||||
{"Only collection node owners may associate leaf nodes with the collection","只有集合节点所有者可以将叶子节点与集合关联"}.
|
||||
{"Only deliver notifications to available users","仅将通知发送给可发送的用户"}.
|
||||
{"Only collection node owners may associate leaf nodes with the collection","只有集合节点所有者可以将叶节点与集合关联"}.
|
||||
{"Only deliver notifications to available users","仅向在线用户发送通知"}.
|
||||
{"Only <enable/> or <disable/> tags are allowed","仅允许 <enable/> 或 <disable/> 标签"}.
|
||||
{"Only <list/> element is allowed in this query","此查询中只允许 <list/> 元素"}.
|
||||
{"Only members may query archives of this room","只有成员才能查询此群聊的存档"}.
|
||||
{"Only moderators and participants are allowed to change the subject in this room","只有主持人和参与者才允许在此群聊更改话题"}.
|
||||
{"Only moderators are allowed to change the subject in this room","只有主持人才允许在此群聊更改话题"}.
|
||||
{"Only moderators are allowed to retract messages","只有主持人才允许撤回消息"}.
|
||||
{"Only moderators and participants are allowed to change the subject in this room","只允许主持人和参与者在此群聊更改话题"}.
|
||||
{"Only moderators are allowed to change the subject in this room","只允许主持人在此群聊更改话题"}.
|
||||
{"Only moderators are allowed to retract messages","只允许主持人撤回消息"}.
|
||||
{"Only moderators can approve voice requests","只有主持人才能批准发言请求"}.
|
||||
{"Only occupants are allowed to send messages to the conference","只有占用者才允许向群聊发送消息"}.
|
||||
{"Only occupants are allowed to send queries to the conference","只有占用者才允许向群聊发送查询"}.
|
||||
{"Only publishers may publish","只有发布人可以发布"}.
|
||||
{"Only service administrators are allowed to send service messages","只有服务管理员才允许发送服务消息"}.
|
||||
{"Only those on a whitelist may associate leaf nodes with the collection","仅白名单用户可以将叶节点与集合关联"}.
|
||||
{"Only those on a whitelist may subscribe and retrieve items","仅白名单用户可以订阅和检索内容项"}.
|
||||
{"Only occupants are allowed to send messages to the conference","只允许参与者向群聊发送消息"}.
|
||||
{"Only occupants are allowed to send queries to the conference","只允许参与者向群聊发送查询"}.
|
||||
{"Only publishers may publish","只有发布者才能发布"}.
|
||||
{"Only service administrators are allowed to send service messages","只允许服务管理员发送服务消息"}.
|
||||
{"Only those on a whitelist may associate leaf nodes with the collection","只有白名单上的那些可以将叶节点与集合关联"}.
|
||||
{"Only those on a whitelist may subscribe and retrieve items","只有白名单上的那些才可以订阅和检索项目"}.
|
||||
{"Organization Name","组织名称"}.
|
||||
{"Organization Unit","组织单位"}.
|
||||
{"Other Modules Available:","其他可用模块:"}.
|
||||
{"Outgoing s2s Connections","出站 s2s 连接"}.
|
||||
{"Outgoing s2s Connections","传出 s2s 连接"}.
|
||||
{"Owner privileges required","需要所有者权限"}.
|
||||
{"Packet relay is denied by service policy","包中继被服务策略拒绝"}.
|
||||
{"Packet relay is denied by service policy","服务策略拒绝数据包中继"}.
|
||||
{"Participant ID","参与者 ID"}.
|
||||
{"Participant","参与者"}.
|
||||
{"Password Verification","密码验证"}.
|
||||
{"Password Verification:","密码验证:"}.
|
||||
{"Password","密码"}.
|
||||
{"Password:","密码:"}.
|
||||
{"Path to Dir","目录的路径"}.
|
||||
{"Path to Dir","目录路径"}.
|
||||
{"Path to File","文件路径"}.
|
||||
{"Payload semantic type information","有效载荷语义类型信息"}.
|
||||
{"Payload semantic type information","有效负载语义类型信息"}.
|
||||
{"Period: ","持续时间: "}.
|
||||
{"Persist items to storage","持久化内容条目"}.
|
||||
{"Persist items to storage","将项目持久化到存储"}.
|
||||
{"Persistent","持久"}.
|
||||
{"Ping query is incorrect","Ping 查询不正确"}.
|
||||
{"Ping","Ping"}.
|
||||
{"Please note that these options will only backup the builtin Mnesia database. If you are using the ODBC module, you also need to backup your SQL database separately.","注意:这些选项仅将备份内置的 Mnesia 数据库。如果您正在使用 ODBC 模块,您还需要分别备份您的数据库。"}.
|
||||
{"Please note that these options will only backup the builtin Mnesia database. If you are using the ODBC module, you also need to backup your SQL database separately.","注意:这些选项只会备份内置的 Mnesia 数据库。如果使用 ODBC 模块,还需要单独备份 SQL 数据库。"}.
|
||||
{"Please, wait for a while before sending new voice request","请稍候,然后再发送新的发言请求"}.
|
||||
{"Pong","Pong"}.
|
||||
{"Possessing 'ask' attribute is not allowed by RFC6121","按照 RFC6121, 不允许有“ask”属性"}.
|
||||
{"Present real Jabber IDs to","将用户真实 JID 显示给"}.
|
||||
{"Previous session not found","上一个会话未找到"}.
|
||||
{"Previous session PID has been killed","上一个会话的 PID 已被杀掉"}.
|
||||
{"Previous session PID has exited","上一个会话的 PID 已退出"}.
|
||||
{"Previous session PID is dead","上一个会话的 PID 已死"}.
|
||||
{"Previous session timed out","上一个会话已超时"}.
|
||||
{"Previous session PID has been killed","上一个会话 PID 已终止"}.
|
||||
{"Previous session PID has exited","上一个会话 PID 已退出"}.
|
||||
{"Previous session PID is dead","上一个会话 PID 已失效"}.
|
||||
{"Previous session timed out","上一个会话超时"}.
|
||||
{"private, ","私人, "}.
|
||||
{"Public","公开"}.
|
||||
{"Publish model","发布模型"}.
|
||||
{"Publish-Subscribe","发布—订阅"}.
|
||||
{"Publish-Subscribe","发布–订阅"}.
|
||||
{"PubSub subscriber request","PubSub 订阅者请求"}.
|
||||
{"Purge all items when the relevant publisher goes offline","相关发布人离线后清除所有选项"}.
|
||||
{"Push record not found","没有找到推送记录"}.
|
||||
{"Purge all items when the relevant publisher goes offline","相关发布者离线后清除所有项目"}.
|
||||
{"Push record not found","推送记录未找到"}.
|
||||
{"Queries to the conference members are not allowed in this room","不允许在此群聊中查询群聊成员"}.
|
||||
{"Query to another users is forbidden","禁止查询其他用户"}.
|
||||
{"RAM and disc copy","内存与磁盘复制"}.
|
||||
{"RAM copy","内存(RAM)复制"}.
|
||||
{"Really delete message of the day?","确实要删除每日消息吗?"}.
|
||||
{"RAM and disc copy","RAM 和磁盘副本"}.
|
||||
{"RAM copy","RAM 副本"}.
|
||||
{"Really delete message of the day?","是否确定删除每日消息?"}.
|
||||
{"Receive notification from all descendent nodes","接收所有后代节点的通知"}.
|
||||
{"Receive notification from direct child nodes only","仅接收所有直接子节点的通知"}.
|
||||
{"Receive notification of new items only","仅接收新内容项的通知"}.
|
||||
{"Receive notification from direct child nodes only","仅接收直接子节点的通知"}.
|
||||
{"Receive notification of new items only","仅接收新项目的通知"}.
|
||||
{"Receive notification of new nodes only","仅接收新节点的通知"}.
|
||||
{"Recipient is not in the conference room","接收者不在群聊"}.
|
||||
{"Register an XMPP account","注册 XMPP 账号"}.
|
||||
{"Register","注册"}.
|
||||
{"Remote copy","远程复制"}.
|
||||
{"Remote copy","远程副本"}.
|
||||
{"Remove a hat from a user","移除用户头衔"}.
|
||||
{"Remove User","移除用户"}.
|
||||
{"Replaced by new connection","被新的连接替换"}.
|
||||
{"Replaced by new connection","替换为新连接"}.
|
||||
{"Request has timed out","请求已超时"}.
|
||||
{"Request is ignored","请求被忽略"}.
|
||||
{"Requested role","请求的角色"}.
|
||||
@@ -410,47 +411,48 @@
|
||||
{"Roles for which Presence is Broadcasted","广播在线状态的角色"}.
|
||||
{"Roles that May Send Private Messages","可以发送私信的角色"}.
|
||||
{"Room Configuration","群聊配置"}.
|
||||
{"Room creation is denied by service policy","群聊创建被服务策略拒绝"}.
|
||||
{"Room creation is denied by service policy","服务策略拒绝群聊创建"}.
|
||||
{"Room description","群聊描述"}.
|
||||
{"Room Occupants","群聊占用者"}.
|
||||
{"Room Occupants","群聊参与者"}.
|
||||
{"Room terminates","群聊终止"}.
|
||||
{"Room title","群聊标题"}.
|
||||
{"Roster groups allowed to subscribe","允许订阅的花名册组"}.
|
||||
{"Roster size","花名册大小"}.
|
||||
{"Running Nodes","运行中的节点"}.
|
||||
{"Running Nodes","正在运行的节点"}.
|
||||
{"~s invites you to the room ~s","~s 邀请您加入群聊 ~s"}.
|
||||
{"Saturday","星期六"}.
|
||||
{"Saturday","周六"}.
|
||||
{"Search from the date","从日期搜索"}.
|
||||
{"Search Results for ","搜索结果 "}.
|
||||
{"Search the text","搜索文本"}.
|
||||
{"Search until the date","搜索截至日期"}.
|
||||
{"Search users in ","在以下位置搜索用户 "}.
|
||||
{"Send announcement to all online users on all hosts","发送通知给所有主机的在线用户"}.
|
||||
{"Send announcement to all online users","发送通知给所有在线用户"}.
|
||||
{"Send announcement to all users on all hosts","发送通知给所有主机上的所有用户"}.
|
||||
{"Send announcement to all users","发送通知给所有用户"}.
|
||||
{"Send announcement to all online users on all hosts","向所有主机上的所有在线用户发送公告"}.
|
||||
{"Send announcement to all online users","向所有在线用户发送公告"}.
|
||||
{"Send announcement to all users on all hosts","向所有主机上的所有用户发送公告"}.
|
||||
{"Send announcement to all users","向所有用户发送公告"}.
|
||||
{"September","九月"}.
|
||||
{"Server:","服务器:"}.
|
||||
{"Service list retrieval timed out","服务列表检索超时"}.
|
||||
{"Session state copying timed out","会话状态复制超时"}.
|
||||
{"Set message of the day and send to online users","设置每日消息并发送给在线用户"}.
|
||||
{"Set message of the day on all hosts and send to online users","在所有主机上设置每日消息并发送给在线用户"}.
|
||||
{"Shared Roster Groups","共享的花名册组群"}.
|
||||
{"Show Integral Table","显示完整列表"}.
|
||||
{"Show Ordinary Table","显示普通列表"}.
|
||||
{"Shared Roster Groups","共享的花名册组"}.
|
||||
{"Show Integral Table","显示完整表"}.
|
||||
{"Show Occupants Join/Leave","显示参与者加入/离开"}.
|
||||
{"Show Ordinary Table","显示普通表"}.
|
||||
{"Shut Down Service","关闭服务"}.
|
||||
{"SOCKS5 Bytestreams","SOCKS5 字节流"}.
|
||||
{"Some XMPP clients can store your password in the computer, but you should do this only in your personal computer for safety reasons.","某些 XMPP 客户端可以将您的密码存储在计算机中,但出于安全考虑,您应该仅在个人计算机中存储密码。"}.
|
||||
{"Sources Specs:","源参数:"}.
|
||||
{"Specify the access model","指定访问范例"}.
|
||||
{"Sources Specs:","源规格:"}.
|
||||
{"Specify the access model","指定访问模型"}.
|
||||
{"Specify the event message type","指定事件消息类型"}.
|
||||
{"Specify the publisher model","指定发布人范例"}.
|
||||
{"Stanza id is not valid","节 id 无效"}.
|
||||
{"Specify the publisher model","指定发布者模型"}.
|
||||
{"Stanza id is not valid","节 ID 无效"}.
|
||||
{"Stanza ID","节 ID"}.
|
||||
{"Statically specify a replyto of the node owner(s)","静态指定节点所有者的回复"}.
|
||||
{"Stopped Nodes","已经停止的节点"}.
|
||||
{"Store binary backup:","存储为二进制备份:"}.
|
||||
{"Store plain text backup:","存储为普通文本备份:"}.
|
||||
{"Statically specify a replyto of the node owner(s)","静态指定节点所有者的 replyto"}.
|
||||
{"Stopped Nodes","已停止的节点"}.
|
||||
{"Store binary backup:","存储二进制备份:"}.
|
||||
{"Store plain text backup:","存储明文备份:"}.
|
||||
{"Stream management is already enabled","流管理已启用"}.
|
||||
{"Stream management is not enabled","流管理未启用"}.
|
||||
{"Subject","话题"}.
|
||||
@@ -459,12 +461,12 @@
|
||||
{"Subscribers may publish","订阅者可以发布"}.
|
||||
{"Subscription requests must be approved and only subscribers may retrieve items","订阅请求必须得到批准,只有订阅者才能检索项目"}.
|
||||
{"Subscriptions are not allowed","不允许订阅"}.
|
||||
{"Sunday","星期天"}.
|
||||
{"Sunday","周日"}.
|
||||
{"Text associated with a picture","与图片相关的文字"}.
|
||||
{"Text associated with a sound","与声音相关的文字"}.
|
||||
{"Text associated with a video","与视频相关的文字"}.
|
||||
{"Text associated with speech","与语音相关的文字"}.
|
||||
{"That nickname is already in use by another occupant","该昵称已被另一占用者使用了"}.
|
||||
{"That nickname is already in use by another occupant","该昵称已被另一参与者使用了"}.
|
||||
{"That nickname is registered by another person","该昵称已被另一用户注册了"}.
|
||||
{"The account already exists","此账号已存在"}.
|
||||
{"The account was not unregistered","此账号未注销"}.
|
||||
@@ -472,35 +474,35 @@
|
||||
{"The CAPTCHA is valid.","验证码有效。"}.
|
||||
{"The CAPTCHA verification has failed","验证码检查失败"}.
|
||||
{"The captcha you entered is wrong","您输入的验证码错误"}.
|
||||
{"The child nodes (leaf or collection) associated with a collection","关联集合的字节点(叶子或集合)"}.
|
||||
{"The collections with which a node is affiliated","加入结点的集合"}.
|
||||
{"The child nodes (leaf or collection) associated with a collection","与集合关联的子节点(叶或集合)"}.
|
||||
{"The collections with which a node is affiliated","节点所属的集合"}.
|
||||
{"The DateTime at which a leased subscription will end or has ended","租赁订阅将结束或已结束的日期时间"}.
|
||||
{"The datetime when the node was created","节点创建的日期时间"}.
|
||||
{"The default language of the node","该节点的默认语言"}.
|
||||
{"The datetime when the node was created","创建节点的日期时间"}.
|
||||
{"The default language of the node","节点的默认语言"}.
|
||||
{"The feature requested is not supported by the conference","群聊不支持请求的功能"}.
|
||||
{"The JID of the node creator","节点创建者的 JID"}.
|
||||
{"The JIDs of those to contact with questions","问题联系人的 JID"}.
|
||||
{"The JIDs of those with an affiliation of owner","拥有所有者从属关系的用户的 JID"}.
|
||||
{"The JIDs of those to contact with questions","有问题要联系的人的 JID"}.
|
||||
{"The JIDs of those with an affiliation of owner","与所有者的从属关系有关的用户 JID"}.
|
||||
{"The JIDs of those with an affiliation of publisher","与发布者的从属关系有关的用户 JID"}.
|
||||
{"The list of all online users","所有在线用户列表"}.
|
||||
{"The list of all users","所有用户列表"}.
|
||||
{"The list of all online users","所有在线用户的列表"}.
|
||||
{"The list of all users","所有用户的列表"}.
|
||||
{"The list of JIDs that may associate leaf nodes with a collection","可以将叶节点与集合关联的 JID 列表"}.
|
||||
{"The maximum number of child nodes that can be associated with a collection, or `max` for no specific limit other than a server imposed maximum","可以与集合相关联的最大子节点数,“max”表示除服务器施加的最大值外没有特定限制"}.
|
||||
{"The minimum number of milliseconds between sending any two notification digests","发送任何两个通知摘要之间的最小毫秒数"}.
|
||||
{"The name of the node","该节点的名称"}.
|
||||
{"The node is a collection node","该节点是集合节点"}.
|
||||
{"The node is a leaf node (default)","该节点是叶子节点(默认)"}.
|
||||
{"The maximum number of child nodes that can be associated with a collection, or `max` for no specific limit other than a server imposed maximum","可以与集合关联的子节点的最大数量,或“max”表示除服务器施加的最大值外没有特定限制"}.
|
||||
{"The minimum number of milliseconds between sending any two notification digests","发送任意两个通知摘要之间的最小毫秒数"}.
|
||||
{"The name of the node","节点的名称"}.
|
||||
{"The node is a collection node","节点是集合节点"}.
|
||||
{"The node is a leaf node (default)","节点是叶节点(默认)"}.
|
||||
{"The NodeID of the relevant node","相关节点的 NodeID"}.
|
||||
{"The number of pending incoming presence subscription requests","待处理的传入状态订阅请求数"}.
|
||||
{"The number of subscribers to the node","该节点的订阅用户数"}.
|
||||
{"The number of unread or undelivered messages","未读或未发送的消息数"}.
|
||||
{"The number of pending incoming presence subscription requests","待处理的传入在线状态订阅请求数"}.
|
||||
{"The number of subscribers to the node","节点的订阅者数量"}.
|
||||
{"The number of unread or undelivered messages","未读或未传递的消息数"}.
|
||||
{"The password contains unacceptable characters","密码包含不可接受的字符"}.
|
||||
{"The password is too weak","密码强度太弱"}.
|
||||
{"The password is too weak","密码太弱"}.
|
||||
{"the password is","密码是"}.
|
||||
{"The password of your XMPP account was successfully changed.","您的 XMPP 账号密码已成功更改。"}.
|
||||
{"The password was not changed","密码未更改"}.
|
||||
{"The passwords are different","密码不一致"}.
|
||||
{"The presence states for which an entity wants to receive notifications","实体要为其接收通知的状态"}.
|
||||
{"The passwords are different","密码不同"}.
|
||||
{"The presence states for which an entity wants to receive notifications","实体要接收通知的在线状态"}.
|
||||
{"The query is only allowed from local users","仅允许本地用户查询"}.
|
||||
{"The query must not contain <item/> elements","查询不能包含 <item/> 元素"}.
|
||||
{"The room subject can be modified by participants","群聊话题可由参与者修改"}.
|
||||
@@ -516,30 +518,30 @@
|
||||
{"This is case insensitive: macbeth is the same that MacBeth and Macbeth.","此处不区分大小写:MacBeth 和 Macbeth 都是 macbeth。"}.
|
||||
{"This page allows to register an XMPP account in this XMPP server. Your JID (Jabber ID) will be of the form: username@server. Please read carefully the instructions to fill correctly the fields.","本页面允许在此服务器中注册 XMPP 账号,您的 JID(Jabber ID)的格式为:用户名@服务器。请仔细阅读说明以正确填写字段。"}.
|
||||
{"This page allows to unregister an XMPP account in this XMPP server.","本页面允许在此 XMPP 服务器中注销 XMPP 账号。"}.
|
||||
{"This room is not anonymous","此群聊不是匿名的"}.
|
||||
{"This room is not anonymous","此群聊是非匿名的"}.
|
||||
{"This service can not process the address: ~s","此服务无法处理地址:~s"}.
|
||||
{"Thursday","星期四"}.
|
||||
{"Thursday","周四"}.
|
||||
{"Time delay","时间延迟"}.
|
||||
{"Timed out waiting for stream resumption","等待流恢复超时"}.
|
||||
{"To register, visit ~s","要注册,请访问 ~s"}.
|
||||
{"To ~ts","发送到~ts"}.
|
||||
{"Token TTL","TTL 令牌"}.
|
||||
{"Too many active bytestreams","活跃的字节流太多"}.
|
||||
{"To ~ts","到 ~ts"}.
|
||||
{"Token TTL","令牌 TTL"}.
|
||||
{"Too many active bytestreams","活动字节流太多"}.
|
||||
{"Too many CAPTCHA requests","验证码请求太多"}.
|
||||
{"Too many child elements","太多子元素"}.
|
||||
{"Too many <item/> elements","太多 <item/> 元素"}.
|
||||
{"Too many <list/> elements","太多 <list/> 元素"}.
|
||||
{"Too many (~p) failed authentications from this IP address (~s). The address will be unblocked at ~s UTC","来自 IP 地址(~p)的(~s)失败认证太多。将在 UTC 时间 ~s 解除对该地址的封锁"}.
|
||||
{"Too many (~p) failed authentications from this IP address (~s). The address will be unblocked at ~s UTC","有太多 (~p) 失败的身份验证来自此 IP 地址 (~s),将在 UTC 时间 ~s 解除对该地址的屏蔽"}.
|
||||
{"Too many receiver fields were specified","指定的接收者字段太多"}.
|
||||
{"Too many unacked stanzas","未被确认的节太多"}.
|
||||
{"Too many unacked stanzas","太多未确认的节"}.
|
||||
{"Too many users in this conference","此群聊中的用户太多"}.
|
||||
{"Traffic rate limit is exceeded","已经超过传输率限制"}.
|
||||
{"Traffic rate limit is exceeded","超过流量速率限制"}.
|
||||
{"~ts's Offline Messages Queue","~ts 的离线消息队列"}.
|
||||
{"Tuesday","星期二"}.
|
||||
{"Tuesday","周二"}.
|
||||
{"Unable to generate a CAPTCHA","无法生成验证码"}.
|
||||
{"Unable to register route on existing local domain","在已存在的本地域上无法注册路由"}.
|
||||
{"Unauthorized","未认证的"}.
|
||||
{"Unexpected action","意外行为"}.
|
||||
{"Unable to register route on existing local domain","无法在现有本地域上注册路由"}.
|
||||
{"Unauthorized","未经授权"}.
|
||||
{"Unexpected action","意外的操作"}.
|
||||
{"Unexpected error condition: ~p","意外错误条件:~p"}.
|
||||
{"Uninstall","卸载"}.
|
||||
{"Unregister an XMPP account","注销 XMPP 账号"}.
|
||||
@@ -548,8 +550,8 @@
|
||||
{"Unsupported version","不支持的版本"}.
|
||||
{"Update message of the day (don't send)","更新每日消息(不发送)"}.
|
||||
{"Update message of the day on all hosts (don't send)","更新所有主机上的每日消息(不发送)"}.
|
||||
{"Update specs to get modules source, then install desired ones.","更新参数获取模块源,然后安装所需的模块。"}.
|
||||
{"Update Specs","更新参数"}.
|
||||
{"Update specs to get modules source, then install desired ones.","更新规格以获取模块源,然后安装所需的模块。"}.
|
||||
{"Update Specs","更新规格"}.
|
||||
{"Upgrade","升级"}.
|
||||
{"URL for Archived Discussion Logs","存档讨论日志的 URL"}.
|
||||
{"User already exists","用户已存在"}.
|
||||
@@ -566,33 +568,33 @@
|
||||
{"Users","用户"}.
|
||||
{"User","用户"}.
|
||||
{"Value 'get' of 'type' attribute is not allowed","不允许“type”属性的“get”值"}.
|
||||
{"Value of '~s' should be boolean","'~s' 的值应为布尔型"}.
|
||||
{"Value of '~s' should be datetime string","'~s' 的值应为日期时间字符串"}.
|
||||
{"Value of '~s' should be integer","'~s' 的值应为整数"}.
|
||||
{"Value of '~s' should be boolean","“~s”的值应为布尔值"}.
|
||||
{"Value of '~s' should be datetime string","“~s”的值应为日期时间字符串"}.
|
||||
{"Value of '~s' should be integer","“~s”的值应为整数"}.
|
||||
{"Value 'set' of 'type' attribute is not allowed","不允许“type”属性的“set”值"}.
|
||||
{"vCard User Search","vCard 用户搜索"}.
|
||||
{"View joined MIX channels","查看已加入的 MIX 频道"}.
|
||||
{"Virtual Hosts","虚拟主机"}.
|
||||
{"Visitors are not allowed to change their nicknames in this room","不允许访客在此群聊中更改其昵称"}.
|
||||
{"Visitors are not allowed to send messages to all occupants","不允许访客向所有占用者发送信息"}.
|
||||
{"Visitors are not allowed to send messages to all occupants","不允许访客向所有参与者发送消息"}.
|
||||
{"Visitor","访客"}.
|
||||
{"Voice requests are disabled in this conference","此群聊中禁用发言请求"}.
|
||||
{"Voice request","发言请求"}.
|
||||
{"Wednesday","星期三"}.
|
||||
{"When a new subscription is processed and whenever a subscriber comes online","当新的订阅被处理和当订阅者上线"}.
|
||||
{"When a new subscription is processed","当新的订阅被处理"}.
|
||||
{"When to send the last published item","何时发送最新发布的内容条目"}.
|
||||
{"Whether an entity wants to receive an XMPP message body in addition to the payload format","除有效载荷格式外,实体是否还希望接收 XMPP 消息正文"}.
|
||||
{"Whether an entity wants to receive digests (aggregations) of notifications or all notifications individually","实体是否要接收通知的摘要(汇总)或单独接收所有通知"}.
|
||||
{"Wednesday","周三"}.
|
||||
{"When a new subscription is processed and whenever a subscriber comes online","处理新订阅时和订阅者上线时"}.
|
||||
{"When a new subscription is processed","处理新订阅时"}.
|
||||
{"When to send the last published item","何时发送最后发布的项目"}.
|
||||
{"Whether an entity wants to receive an XMPP message body in addition to the payload format","除有效负载格式外,实体是否还希望接收 XMPP 消息正文"}.
|
||||
{"Whether an entity wants to receive digests (aggregations) of notifications or all notifications individually","实体是要接收通知摘要(汇总) 还是要单独接收所有通知"}.
|
||||
{"Whether an entity wants to receive or disable notifications","实体是否要接收或禁用通知"}.
|
||||
{"Whether owners or publisher should receive replies to items","所有者或发布者是否应收到对项目的回复"}.
|
||||
{"Whether the node is a leaf (default) or a collection","节点是叶子(默认)还是集合"}.
|
||||
{"Whether the node is a leaf (default) or a collection","节点是叶(默认)还是集合"}.
|
||||
{"Whether to allow subscriptions","是否允许订阅"}.
|
||||
{"Whether to make all subscriptions temporary, based on subscriber presence","是否根据订阅者的存在将所有订阅设为临时"}.
|
||||
{"Whether to make all subscriptions temporary, based on subscriber presence","是否根据订阅者的在线状态将所有订阅设为临时订阅"}.
|
||||
{"Whether to notify owners about new subscribers and unsubscribes","是否通知所有者新的订阅者和退订者"}.
|
||||
{"Who can send private messages","谁可以发送私信"}.
|
||||
{"Who may associate leaf nodes with a collection","谁可以将叶子节点与集合关联"}.
|
||||
{"Wrong parameters in the web formulary","网络配方中的参数错误"}.
|
||||
{"Who may associate leaf nodes with a collection","谁可以将叶节点与集合关联"}.
|
||||
{"Wrong parameters in the web formulary","web 公式中的参数错误"}.
|
||||
{"Wrong xmlns","错误的 xmlns"}.
|
||||
{"XMPP Account Registration","XMPP 账号注册"}.
|
||||
{"XMPP Domains","XMPP 域"}.
|
||||
@@ -600,7 +602,7 @@
|
||||
{"XMPP Show Value of Chat","XMPP 的聊天显示值"}.
|
||||
{"XMPP Show Value of DND (Do Not Disturb)","XMPP 的 DND(请勿打扰)显示值"}.
|
||||
{"XMPP Show Value of XA (Extended Away)","XMPP 的 XA(延长离开)显示值"}.
|
||||
{"XMPP URI of Associated Publish-Subscribe Node","关联发布—订阅节点的 XMPP URI"}.
|
||||
{"XMPP URI of Associated Publish-Subscribe Node","关联发布–订阅节点的 XMPP URI"}.
|
||||
{"You are being removed from the room because of a system shutdown","由于系统关闭,您将会从群聊中移除"}.
|
||||
{"You are not allowed to send private messages","不允许您发送私信"}.
|
||||
{"You are not joined to the channel","您未加入频道"}.
|
||||
|
||||
+5
-5
@@ -33,10 +33,10 @@
|
||||
{if_var_true, redis,
|
||||
{eredis, "~> 1.2.0", {git, "https://github.com/wooga/eredis", {tag, "v1.2.0"}}}},
|
||||
{if_var_true, sip,
|
||||
{esip, "~> 1.0.52", {git, "https://github.com/processone/esip", {tag, "1.0.53"}}}},
|
||||
{esip, "~> 1.0.52", {git, "https://github.com/processone/esip", {tag, "1.0.54"}}}},
|
||||
{if_var_true, zlib,
|
||||
{ezlib, "~> 1.0.12", {git, "https://github.com/processone/ezlib", {tag, "1.0.13"}}}},
|
||||
{fast_tls, "~> 1.1.19", {git, "https://github.com/processone/fast_tls", {tag, "1.1.20"}}},
|
||||
{fast_tls, "~> 1.1.19", {git, "https://github.com/processone/fast_tls", {tag, "1.1.21"}}},
|
||||
{fast_xml, "~> 1.1.51", {git, "https://github.com/processone/fast_xml", {tag, "1.1.52"}}},
|
||||
{fast_yaml, "~> 1.0.36", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.37"}}},
|
||||
{idna, "~> 6.0", {git, "https://github.com/benoitc/erlang-idna", {tag, "6.0.0"}}},
|
||||
@@ -61,15 +61,15 @@
|
||||
{p1_mysql, "~> 1.0.24", {git, "https://github.com/processone/p1_mysql", {tag, "1.0.24"}}}},
|
||||
{p1_oauth2, "~> 0.6.14", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.14"}}},
|
||||
{if_var_true, pgsql,
|
||||
{p1_pgsql, "~> 1.1.26", {git, "https://github.com/processone/p1_pgsql", {tag, "1.1.26"}}}},
|
||||
{p1_pgsql, "~> 1.1.26", {git, "https://github.com/processone/p1_pgsql", {tag, "1.1.27"}}}},
|
||||
{p1_utils, "~> 1.0.25", {git, "https://github.com/processone/p1_utils", {tag, "1.0.26"}}},
|
||||
{pkix, "~> 1.0.10", {git, "https://github.com/processone/pkix", {tag, "1.0.10"}}},
|
||||
{if_var_true, sqlite,
|
||||
{sqlite3, "~> 1.1.14", {git, "https://github.com/processone/erlang-sqlite3", {tag, "1.1.15"}}}},
|
||||
{stringprep, "~> 1.0.29", {git, "https://github.com/processone/stringprep", {tag, "1.0.30"}}},
|
||||
{if_var_true, stun,
|
||||
{stun, "~> 1.2.12", {git, "https://github.com/processone/stun", {tag, "1.2.13"}}}},
|
||||
{xmpp, "~> 1.8.2", {git, "https://github.com/processone/xmpp", {tag, "1.8.2"}}},
|
||||
{stun, "~> 1.2.12", {git, "https://github.com/processone/stun", {tag, "1.2.14"}}}},
|
||||
{xmpp, "~> 1.8.3", {git, "https://github.com/processone/xmpp", {tag, "1.8.3"}}},
|
||||
{yconf, "~> 1.0.15", {git, "https://github.com/processone/yconf", {tag, "1.0.16"}}}
|
||||
]}.
|
||||
|
||||
|
||||
+57
-62
@@ -1,91 +1,86 @@
|
||||
{"1.2.0",
|
||||
[{<<"base64url">>,{pkg,<<"base64url">>,<<"1.0.1">>},1},
|
||||
{<<"cache_tab">>,{pkg,<<"cache_tab">>,<<"1.0.30">>},0},
|
||||
{<<"eimp">>,{pkg,<<"eimp">>,<<"1.0.22">>},0},
|
||||
{<<"cache_tab">>,{pkg,<<"cache_tab">>,<<"1.0.31">>},0},
|
||||
{<<"eimp">>,{pkg,<<"eimp">>,<<"1.0.23">>},0},
|
||||
{<<"epam">>,{pkg,<<"epam">>,<<"1.0.14">>},0},
|
||||
{<<"eredis">>,{pkg,<<"eredis">>,<<"1.2.0">>},0},
|
||||
{<<"esip">>,{pkg,<<"esip">>,<<"1.0.52">>},0},
|
||||
{<<"ezlib">>,{pkg,<<"ezlib">>,<<"1.0.12">>},0},
|
||||
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.19">>},0},
|
||||
{<<"fast_xml">>,{pkg,<<"fast_xml">>,<<"1.1.51">>},0},
|
||||
{<<"fast_yaml">>,{pkg,<<"fast_yaml">>,<<"1.0.36">>},0},
|
||||
{<<"esip">>,{pkg,<<"esip">>,<<"1.0.54">>},0},
|
||||
{<<"ezlib">>,{pkg,<<"ezlib">>,<<"1.0.13">>},0},
|
||||
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.21">>},0},
|
||||
{<<"fast_xml">>,{pkg,<<"fast_xml">>,<<"1.1.52">>},0},
|
||||
{<<"fast_yaml">>,{pkg,<<"fast_yaml">>,<<"1.0.37">>},0},
|
||||
{<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},0},
|
||||
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.1.1">>},0},
|
||||
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.1.2">>},1},
|
||||
{<<"jose">>,{pkg,<<"jose">>,<<"1.11.10">>},0},
|
||||
{<<"luerl">>,{pkg,<<"luerl">>,<<"1.2.0">>},0},
|
||||
{<<"mqtree">>,{pkg,<<"mqtree">>,<<"1.0.16">>},0},
|
||||
{<<"p1_acme">>,
|
||||
{git,"https://github.com/processone/p1_acme",
|
||||
{ref,"176b4a8c67627c3229fbea3c05d82a5d567e6e49"}},
|
||||
0},
|
||||
{<<"p1_mysql">>,
|
||||
{git,"https://github.com/processone/p1_mysql",
|
||||
{ref,"0dccb755a60cda61d41e7b092b344d38d1ebc802"}},
|
||||
0},
|
||||
{<<"mqtree">>,{pkg,<<"mqtree">>,<<"1.0.17">>},0},
|
||||
{<<"p1_acme">>,{pkg,<<"p1_acme">>,<<"1.0.23">>},0},
|
||||
{<<"p1_mysql">>,{pkg,<<"p1_mysql">>,<<"1.0.24">>},0},
|
||||
{<<"p1_oauth2">>,{pkg,<<"p1_oauth2">>,<<"0.6.14">>},0},
|
||||
{<<"p1_pgsql">>,
|
||||
{git,"https://github.com/processone/p1_pgsql",
|
||||
{ref,"fe0bb2a2a2ae21cd9fc48b81520cfce508520a56"}},
|
||||
0},
|
||||
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.25">>},0},
|
||||
{<<"pkix">>,
|
||||
{git,"https://github.com/processone/pkix",
|
||||
{ref,"03be27c7168449bdfeb8c5b6cc0f800f71f8cfe9"}},
|
||||
0},
|
||||
{<<"sqlite3">>,{pkg,<<"sqlite3">>,<<"1.1.14">>},0},
|
||||
{<<"stringprep">>,{pkg,<<"stringprep">>,<<"1.0.29">>},0},
|
||||
{<<"stun">>,{pkg,<<"stun">>,<<"1.2.12">>},0},
|
||||
{<<"p1_pgsql">>,{pkg,<<"p1_pgsql">>,<<"1.1.27">>},0},
|
||||
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.26">>},0},
|
||||
{<<"pkix">>,{pkg,<<"pkix">>,<<"1.0.10">>},0},
|
||||
{<<"sqlite3">>,{pkg,<<"sqlite3">>,<<"1.1.15">>},0},
|
||||
{<<"stringprep">>,{pkg,<<"stringprep">>,<<"1.0.30">>},0},
|
||||
{<<"stun">>,{pkg,<<"stun">>,<<"1.2.14">>},0},
|
||||
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},1},
|
||||
{<<"xmpp">>,
|
||||
{git,"https://github.com/processone/xmpp",
|
||||
{ref,"a1fb778bd385d832f913e564558152ea507dac37"}},
|
||||
0},
|
||||
{<<"yconf">>,{pkg,<<"yconf">>,<<"1.0.15">>},0}]}.
|
||||
{<<"xmpp">>,{pkg,<<"xmpp">>,<<"1.8.3">>},0},
|
||||
{<<"yconf">>,{pkg,<<"yconf">>,<<"1.0.16">>},0}]}.
|
||||
[
|
||||
{pkg_hash,[
|
||||
{<<"base64url">>, <<"F8C7F2DA04CA9A5D0F5F50258F055E1D699F0E8BF4CFDB30B750865368403CF6">>},
|
||||
{<<"cache_tab">>, <<"6D35EECFB65FBE5FC85988503A27338D32DE01243F3FC8EA3EE7161AF08725A4">>},
|
||||
{<<"eimp">>, <<"FA9B376EF0B50E8455DB15C7C11DEA4522C6902E04412288AAB436D26335F6EB">>},
|
||||
{<<"cache_tab">>, <<"E4097B50A6F373AB1E0A5F01BAB0BEF6626771A4CD6C93404ED6D54810E11FBC">>},
|
||||
{<<"eimp">>, <<"AAF32EFAB061143403DADBAA63E699EF8E81702FBFA96FD436D5E9BE4D6A8D3A">>},
|
||||
{<<"epam">>, <<"AA0B85D27F4EF3A756AE995179DF952A0721237E83C6B79D644347B75016681A">>},
|
||||
{<<"eredis">>, <<"0B8E9CFC2C00FA1374CD107EA63B49BE08D933DF2CF175E6A89B73DD9C380DE4">>},
|
||||
{<<"esip">>, <<"A2840287C493A4280E6FBA57A257706843B025C315875E38B03FD07190E22DBA">>},
|
||||
{<<"ezlib">>, <<"FFE906BA10D03AAEE7977E1E0E81D9FFC3BB8B47FB9CD8E2E453507A2E56221F">>},
|
||||
{<<"fast_tls">>, <<"F52731A4B35259FA06CF23E2A0732920AD9EFCE7C3D68377F129A474998747BB">>},
|
||||
{<<"fast_xml">>, <<"A7F8C6942591632309099386D5C339C89997AC2BBDD1216F6C196DEE6D7828A9">>},
|
||||
{<<"fast_yaml">>, <<"65413A34A570FD4E205A460BA602E4EE7A682F35C22D2E1C839025DBF515105C">>},
|
||||
{<<"esip">>, <<"DAE8FB8278FD3B2C0D38C2E832C4B8D26700EB239B9A42C8EA574FEE76F5E76A">>},
|
||||
{<<"ezlib">>, <<"3C7F62862850A241159C10B218ECF580BCE54D0890601B65144DACC2633BE2B0">>},
|
||||
{<<"fast_tls">>, <<"65D7D547A09EEFB37A1C0D04D8601FAC4F3E6E2C1EDE859A7787081670F9648D">>},
|
||||
{<<"fast_xml">>, <<"0289DAAFBF1190B0E53B444D4885CCCF41E4B05768D4B3ACC76DD8D143668E10">>},
|
||||
{<<"fast_yaml">>, <<"F71D472FBF787CCD161B914D1EB486116A0F4F2E835337A378FBD31B59D2E74B">>},
|
||||
{<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>},
|
||||
{<<"jiffy">>, <<"ACA10F47AA91697BF24AB9582C74E00E8E95474C7EF9F76D4F1A338D0F5DE21B">>},
|
||||
{<<"jiffy">>, <<"A9B6C9A7EC268E7CF493D028F0A4C9144F59CCB878B1AFE42841597800840A1B">>},
|
||||
{<<"jose">>, <<"A903F5227417BD2A08C8A00A0CBCC458118BE84480955E8D251297A425723F83">>},
|
||||
{<<"luerl">>, <<"60F05F4240F0E7C148DDB79B67B8FF972734AAD237AA74C83D0748B8214C8EF0">>},
|
||||
{<<"mqtree">>, <<"F8F8B4971E4CA94313BA9BCAAA1AA1077DAABA5E3FD3468FFB491420A4CC3593">>},
|
||||
{<<"mqtree">>, <<"82F54B8F2D22B4445DB1D6CCCB7FE9EAD049D61410C29E32475F3CEB3EE62A89">>},
|
||||
{<<"p1_acme">>, <<"791AEF0F79DC7F768B228808250C349FA9CE585CD8779DA50CA93106EB3394D0">>},
|
||||
{<<"p1_mysql">>, <<"0ED1E098C5A4525032448C65A2715F30980AAE725615A4D255FD25F26BB22507">>},
|
||||
{<<"p1_oauth2">>, <<"1C5F82535574DE87E2059695AC4B91F8F9AEBACBC1C80287DAE6F02552D47AEA">>},
|
||||
{<<"p1_utils">>, <<"2D39B5015A567BBD2CC7033EEB93A7C60D8C84EFE1EF69A3473FAA07FA268187">>},
|
||||
{<<"sqlite3">>, <<"F9EA0CFF8540865FDFDB7E24EEF34DC46677364B1C070896E99B5BF08C8A7FD7">>},
|
||||
{<<"stringprep">>, <<"02F23E8C3A219A3DFE40A22E908BECE3A2F68AF0FF599EA8A7B714ECB21E62EE">>},
|
||||
{<<"stun">>, <<"A65DF67A8AAAECB6A94D687977B2E9F161820819910CB97BBE26A3525356525B">>},
|
||||
{<<"p1_pgsql">>, <<"883E335D82AC062DE0BDE7981F8250A2E632258BB7A47DF839A4CBDCB3E971E6">>},
|
||||
{<<"p1_utils">>, <<"67B0C4AC9FA3BA3EF563B31AA111B0A004439A37FAC85E027F1C3617E1C7EC6C">>},
|
||||
{<<"pkix">>, <<"D3BFADF7B7CFE2A3636F1B256C9CCE5F646A07CE31E57EE527668502850765A0">>},
|
||||
{<<"sqlite3">>, <<"E819DEFD280145C328457D7AF897D2E45E8E5270E18812EE30B607C99CDD21AF">>},
|
||||
{<<"stringprep">>, <<"46CF0FF631B3E7328F61F20B454D59428D87738F25D709798B5DCBB9B83C23F1">>},
|
||||
{<<"stun">>, <<"6F538AC80C842131DBD149055570D116BFABC9B5EBFF4BD6AF2E7888958C660C">>},
|
||||
{<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>},
|
||||
{<<"yconf">>, <<"E22998B3D7728270BDD06162A9515BD142B14FAE8927CBDBD3EF639C32AA6F7A">>}]},
|
||||
{<<"xmpp">>, <<"ACF39A8B70B066BB8F10B0862E031E8ABCF92FE89D1C41D06C1E39AE5CAF89C4">>},
|
||||
{<<"yconf">>, <<"D59521D66FF89F219411B6E9277CD6FEEC7CC6FCE11554E67DE02A8D0A470479">>}]},
|
||||
{pkg_hash_ext,[
|
||||
{<<"base64url">>, <<"F9B3ADD4731A02A9B0410398B475B33E7566A695365237A6BDEE1BB447719F5C">>},
|
||||
{<<"cache_tab">>, <<"6D8A5E00D8F84C42627706A6DBEDB02E34D58495F3ED61935C8475CA0531CDA0">>},
|
||||
{<<"eimp">>, <<"B3B9FFB1D9A5F4A2BA88AC418A819164932D9A9D3A2FC3D32CA338CE855C4392">>},
|
||||
{<<"cache_tab">>, <<"8582B60A4A09B247EF86355BA9E07FCE9E11EDC0345A775C9171F971C72B6351">>},
|
||||
{<<"eimp">>, <<"907C780023CB2893E4FC4BDBE6A4F02C355913862AC67F0ECC26605E816B628A">>},
|
||||
{<<"epam">>, <<"2F3449E72885A72A6C2A843F561ADD0FC2F70D7A21F61456930A547473D4D989">>},
|
||||
{<<"eredis">>, <<"D9B5ABEF2C2C8ABA8F32AA018203E0B3DC8B1157773B254AB1D4C2002317F1E1">>},
|
||||
{<<"esip">>, <<"6F00165395900500AA262CE0297162D93931C78C1464D89FD0EDC6E3D6BC011F">>},
|
||||
{<<"ezlib">>, <<"30E94355FB42260AAB6E12582CB0C56BF233515E655C8AEAF48760E7561E4EBB">>},
|
||||
{<<"fast_tls">>, <<"DB34322C8782D4C5139CCB80709D8EC8C38089B44262EDD0C2F660AC495BD389">>},
|
||||
{<<"fast_xml">>, <<"7FCE41B7D1A4BA438A2D7A088DABE74A3CA0739F1AF2ABCB77E62DAF43E0409A">>},
|
||||
{<<"fast_yaml">>, <<"1ABE8F758FC2A86B08EDFF80BBC687CFD41EBC1412CFEC0EF4A0ACFCD032052F">>},
|
||||
{<<"esip">>, <<"8187AF819D7259CDADDAF69726C239EF604C9B0B0298A5F2D3E687BF5E2237EE">>},
|
||||
{<<"ezlib">>, <<"9EE62AB3F8ED55A0FD11A9569FCB8E458683F95575417272192B069F092ABFBB">>},
|
||||
{<<"fast_tls">>, <<"131542913937025E48CD80AA81F00359686D5501B75621E72026A87B5229505B">>},
|
||||
{<<"fast_xml">>, <<"795192390E06D2B65016A6990BBFA5727F4A26D2914808B1C3C9A32EEDCD1BFD">>},
|
||||
{<<"fast_yaml">>, <<"8DE868721BF7E2172414F7D3148EDE0F3C922B496455CD625DD5C4429515A769">>},
|
||||
{<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>},
|
||||
{<<"jiffy">>, <<"62E1F0581C3C19C33A725C781DFA88410D8BFF1BBAFC3885A2552286B4785C4C">>},
|
||||
{<<"jiffy">>, <<"BB61BC42A720BBD33CB09A410E48BB79A61012C74CB8B3E75F26D988485CF381">>},
|
||||
{<<"jose">>, <<"0D6CD36FF8BA174DB29148FC112B5842186B68A90CE9FC2B3EC3AFE76593E614">>},
|
||||
{<<"luerl">>, <<"9CAFD4F6094FF0F5A9D278FD81D60D3E026C820BDFB6CACD4B1BD909F21B525D">>},
|
||||
{<<"mqtree">>, <<"C87D1C95575DB65AF29B795C9DAA3BED43F5C1BF84072A74469659BCF53594EB">>},
|
||||
{<<"mqtree">>, <<"5FE8B7CF8FBC4783D0FCEB94654AC2BBF3242A58CD0397D249DED8AE021BE2A3">>},
|
||||
{<<"p1_acme">>, <<"8CE196F26E3D22EA10B7809122950465878C127F80767E325207AED7E8D0DD59">>},
|
||||
{<<"p1_mysql">>, <<"F058865F64257F507A2C6A5AFF369B1375DBCB30B3D4258DAD4F1B3EAFFB655F">>},
|
||||
{<<"p1_oauth2">>, <<"1FD3AC474E43722D9D5A87C6DF8D36F698ED87AF7BB81CBBB66361451D99AE8F">>},
|
||||
{<<"p1_utils">>, <<"9219214428F2C6E5D3187FF8EB9A8783695C2427420BE9A259840E07ADA32847">>},
|
||||
{<<"sqlite3">>, <<"85054B6CA297343C159ED6794A473FF2C8EEABD854B6FE02F711C0BFD373CE86">>},
|
||||
{<<"stringprep">>, <<"928EBA304C3006EB1512110EBD7B87DB163B00859A09375A1E4466152C6C462A">>},
|
||||
{<<"stun">>, <<"A2055032B6D338D0454142004BCB12FAFB0C64AB1F273F1D0C6923EBBC8EDE40">>},
|
||||
{<<"p1_pgsql">>, <<"8E4D1A7602CB68780E55D89DC5A9B2E1AACA3F4F1EE3D1A25F2F8C3D2364FFB9">>},
|
||||
{<<"p1_utils">>, <<"D0379E8C1156B98BD64F8129C1DE022FCCA4F2FDB7486CE73BF0ED2C3376B04C">>},
|
||||
{<<"pkix">>, <<"E02164F83094CB124C41B1AB28988A615D54B9ADC38575F00F19A597A3AC5D0E">>},
|
||||
{<<"sqlite3">>, <<"3C0BA4E13322C2AD49DE4E2DDD28311366ADDE54BEAE8DBA9D9E3888F69D2857">>},
|
||||
{<<"stringprep">>, <<"F6FC9B3384A03877830F89B2F38580CAF3F4A27448A4A333D6A8C3975C220B9A">>},
|
||||
{<<"stun">>, <<"E134807B1B7A8DFFD94E64EEFEE00E65C7B4042F3D14E16F8F43566D20371583">>},
|
||||
{<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>},
|
||||
{<<"yconf">>, <<"7FF2AB24D3C9833842716B9AAAA01A8F96641A7695CBB701B03445C4DEF01117">>}]}
|
||||
{<<"xmpp">>, <<"ED70065F9A89A818DCFF43B74C080C9E7F4F1414E1051BEDDB7280DB809AF711">>},
|
||||
{<<"yconf">>, <<"E947813273F38711C7B2E5A8E4ACC9A51C7BBE854F744A345F60300B38586C89">>}]}
|
||||
].
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ CREATE INDEX i_timestamp USING BTREE ON archive(timestamp);
|
||||
CREATE INDEX i_archive_username_origin_id USING BTREE ON archive(username(191), origin_id(191));
|
||||
|
||||
-- To update 'archive' from ejabberd <= 23.10:
|
||||
-- ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT '';
|
||||
-- ALTER TABLE archive ADD COLUMN origin_id origin_id(191) NOT NULL DEFAULT '';
|
||||
-- ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT;
|
||||
-- CREATE INDEX i_archive_username_origin_id USING BTREE ON archive(username(191), origin_id(191));
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
{ok, Terms} ->
|
||||
Backends = [mssql, mysql, odbc, pgsql, redis, sqlite],
|
||||
EBs = lists:filter(fun(Backend) -> lists:member({Backend, true}, Terms) end, Backends),
|
||||
Elixirs = case lists:keyfind(elixir, 1, Terms) of
|
||||
{elixir, true} -> [elixir, iex, logger, mix];
|
||||
_ -> []
|
||||
Elixirs = case proplists:get_bool(elixir, Terms) of
|
||||
true -> [elixir, logger, mix];
|
||||
false -> []
|
||||
end,
|
||||
|
||||
ProfileEnvironmentVariable = os:getenv("REBAR_PROFILE"),
|
||||
|
||||
+4
-1
@@ -53,7 +53,10 @@
|
||||
-include("logger.hrl").
|
||||
|
||||
start() ->
|
||||
application:ensure_all_started(ejabberd).
|
||||
case application:ensure_all_started(ejabberd) of
|
||||
{error, Err} -> error_logger:error_msg("Failed to start ejabberd application: ~p", [Err]);
|
||||
Ok -> Ok
|
||||
end.
|
||||
|
||||
stop() ->
|
||||
application:stop(ejabberd).
|
||||
|
||||
+194
-28
@@ -34,6 +34,10 @@
|
||||
delete/3,
|
||||
delete/4,
|
||||
delete/5,
|
||||
subscribe/4,
|
||||
subscribe/5,
|
||||
unsubscribe/4,
|
||||
unsubscribe/5,
|
||||
run/2,
|
||||
run/3,
|
||||
run_fold/3,
|
||||
@@ -59,6 +63,8 @@
|
||||
-include("ejabberd_stacktrace.hrl").
|
||||
|
||||
-record(state, {}).
|
||||
-type subscriber() :: {Module :: atom(), Function :: atom(), InitArg :: any()}.
|
||||
-type subscriber_event() :: before | 'after' | before_callback | after_callback.
|
||||
-type hook() :: {Seq :: integer(), Module :: atom(), Function :: atom() | fun()}.
|
||||
|
||||
-define(TRACE_HOOK_KEY, '$trace_hook').
|
||||
@@ -87,6 +93,34 @@ add(Hook, Module, Function, Seq) ->
|
||||
add(Hook, Host, Module, Function, Seq) ->
|
||||
gen_server:call(?MODULE, {add, Hook, Host, Module, Function, Seq}).
|
||||
|
||||
-spec subscribe(atom(), atom(), atom(), any()) -> ok.
|
||||
%% @doc Add a subscriber to this hook.
|
||||
%%
|
||||
%% Before running any hook callback, the subscriber will be called in form of
|
||||
%% Module:Function(InitArg, 'before', Host :: binary() | global, Hook, HookArgs)
|
||||
%% Above function should return new state.
|
||||
%%
|
||||
%% Before running each callback, the subscriber will be called in form of
|
||||
%% Module:Function(State, 'before_callback', Host :: binary() | global, Hook, {CallbackMod, CallbackArg, Seq, HookArgs})
|
||||
%% Above function should return new state.
|
||||
%%
|
||||
%% After running each callback, the subscriber will be called in form of
|
||||
%% Module:Function(State, 'after_callback', Host :: binary() | global, Hook, {CallbackMod, CallbackArg, Seq, HookArgs})
|
||||
%% Above function should return new state.
|
||||
%%
|
||||
%% After running any hook callback, the subscriber will be called in form of
|
||||
%% Module:Function(State, 'after', Host :: binary() | global, Hook, HookArgs)
|
||||
%% Return value of this function call will be dropped.
|
||||
%%
|
||||
%% For every ejabberd_hooks:[run|run_fold] for every subscriber above functions will be called and the hook runner
|
||||
%% maintains State in above four calls.
|
||||
subscribe(Hook, Module, Function, InitArg) ->
|
||||
subscribe(Hook, global, Module, Function, InitArg).
|
||||
|
||||
-spec subscribe(atom(), binary() | global, atom(), atom(), any()) -> ok.
|
||||
subscribe(Hook, Host, Module, Function, InitArg) ->
|
||||
gen_server:call(?MODULE, {subscribe, Hook, Host, Module, Function, InitArg}).
|
||||
|
||||
-spec delete(atom(), fun(), integer()) -> ok.
|
||||
%% @doc See del/4.
|
||||
delete(Hook, Function, Seq) when is_function(Function) ->
|
||||
@@ -105,8 +139,20 @@ delete(Hook, Module, Function, Seq) ->
|
||||
delete(Hook, Host, Module, Function, Seq) ->
|
||||
gen_server:call(?MODULE, {delete, Hook, Host, Module, Function, Seq}).
|
||||
|
||||
|
||||
|
||||
-spec unsubscribe(atom(), atom(), atom(), any()) -> ok.
|
||||
%% @doc Removes a subscriber from this hook.
|
||||
unsubscribe(Hook, Module, Function, InitArg) ->
|
||||
unsubscribe(Hook, global, Module, Function, InitArg).
|
||||
|
||||
-spec unsubscribe(atom(), binary() | global, atom(), atom(), any()) -> ok.
|
||||
unsubscribe(Hook, Host, Module, Function, InitArg) ->
|
||||
gen_server:call(?MODULE, {unsubscribe, Hook, Host, Module, Function, InitArg}).
|
||||
|
||||
|
||||
-spec run(atom(), list()) -> ok.
|
||||
%% @doc Run the calls of this hook in order, don't care about function results.
|
||||
%% @doc Run the calls (and subscibers) of this hook in order, don't care about function results.
|
||||
%% If a call returns stop, no more calls are performed.
|
||||
run(Hook, Args) ->
|
||||
run(Hook, global, Args).
|
||||
@@ -114,17 +160,28 @@ run(Hook, Args) ->
|
||||
-spec run(atom(), binary() | global, list()) -> ok.
|
||||
run(Hook, Host, Args) ->
|
||||
try ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls}] ->
|
||||
[{_, Ls, Subs}] ->
|
||||
case erlang:get(?TRACE_HOOK_KEY) of
|
||||
undefined ->
|
||||
undefined when Subs == [] ->
|
||||
run1(Ls, Hook, Args);
|
||||
undefined ->
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, Args, before, []),
|
||||
Subs3 = run1(Ls, Hook, Args, Host, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, Args, 'after', []),
|
||||
ok;
|
||||
TracingHooksOpts ->
|
||||
case do_get_tracing_options(Hook, Host, TracingHooksOpts) of
|
||||
undefined ->
|
||||
run1(Ls, Hook, Args);
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, Args, before, []),
|
||||
Subs3 = run1(Ls, Hook, Args, Host, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, Args, 'after', []),
|
||||
ok;
|
||||
TracingOpts ->
|
||||
foreach_start_hook_tracing(TracingOpts, Hook, Host, Args),
|
||||
run2(Ls, Hook, Args, Host, TracingOpts)
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, Args, before, []),
|
||||
Subs3 = run2(Ls, Hook, Args, Host, TracingOpts, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, Args, 'after', []),
|
||||
ok
|
||||
end
|
||||
end;
|
||||
[] ->
|
||||
@@ -134,7 +191,7 @@ run(Hook, Host, Args) ->
|
||||
end.
|
||||
|
||||
-spec run_fold(atom(), T, list()) -> T.
|
||||
%% @doc Run the calls of this hook in order.
|
||||
%% @doc Run the calls (and subscribers) of this hook in order.
|
||||
%% The arguments passed to the function are: [Val | Args].
|
||||
%% The result of a call is used as Val for the next call.
|
||||
%% If a call returns 'stop', no more calls are performed.
|
||||
@@ -145,17 +202,28 @@ run_fold(Hook, Val, Args) ->
|
||||
-spec run_fold(atom(), binary() | global, T, list()) -> T.
|
||||
run_fold(Hook, Host, Val, Args) ->
|
||||
try ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls}] ->
|
||||
[{_, Ls, Subs}] ->
|
||||
case erlang:get(?TRACE_HOOK_KEY) of
|
||||
undefined ->
|
||||
undefined when Subs == [] ->
|
||||
run_fold1(Ls, Hook, Val, Args);
|
||||
undefined ->
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, [Val | Args], before, []),
|
||||
{Val2, Subs3} = run_fold1(Ls, Hook, Val, Args, Host, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, [Val2 | Args], 'after', []),
|
||||
Val2;
|
||||
TracingHooksOpts ->
|
||||
case do_get_tracing_options(Hook, Host, TracingHooksOpts) of
|
||||
undefined ->
|
||||
run_fold1(Ls, Hook, Val, Args);
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, [Val | Args], before, []),
|
||||
{Val2, Subs3} = run_fold1(Ls, Hook, Val, Args, Host, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, [Val2 | Args], 'after', []),
|
||||
Val2;
|
||||
TracingOpts ->
|
||||
fold_start_hook_tracing(TracingOpts, Hook, Host, [Val | Args]),
|
||||
run_fold2(Ls, Hook, Val, Args, Host, TracingOpts)
|
||||
Subs2 = call_subscriber_list(Subs, Host, Hook, [Val | Args], before, []),
|
||||
{Val2, Subs3} = run_fold2(Ls, Hook, Val, Args, Host, TracingOpts, Subs2),
|
||||
_Subs4 = call_subscriber_list(Subs3, Host, Hook, [Val2 | Args], 'after', []),
|
||||
Val2
|
||||
end
|
||||
end;
|
||||
[] ->
|
||||
@@ -230,6 +298,14 @@ handle_call({delete, Hook, Host, Module, Function, Seq}, _From, State) ->
|
||||
HookFormat = {Seq, Module, Function},
|
||||
Reply = handle_delete(Hook, Host, HookFormat),
|
||||
{reply, Reply, State};
|
||||
handle_call({subscribe, Hook, Host, Module, Function, InitArg}, _From, State) ->
|
||||
SubscriberFormat = {Module, Function, InitArg},
|
||||
Reply = handle_subscribe(Hook, Host, SubscriberFormat),
|
||||
{reply, Reply, State};
|
||||
handle_call({unsubscribe, Hook, Host, Module, Function, InitArg}, _From, State) ->
|
||||
SubscriberFormat = {Module, Function, InitArg},
|
||||
Reply = handle_unsubscribe(Hook, Host, SubscriberFormat),
|
||||
{reply, Reply, State};
|
||||
handle_call(Request, From, State) ->
|
||||
?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]),
|
||||
{noreply, State}.
|
||||
@@ -237,27 +313,53 @@ handle_call(Request, From, State) ->
|
||||
-spec handle_add(atom(), atom(), hook()) -> ok.
|
||||
handle_add(Hook, Host, El) ->
|
||||
case ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls}] ->
|
||||
[{_, Ls, Subs}] ->
|
||||
case lists:member(El, Ls) of
|
||||
true ->
|
||||
ok;
|
||||
false ->
|
||||
NewLs = lists:merge(Ls, [El]),
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs}),
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs, Subs}),
|
||||
ok
|
||||
end;
|
||||
[] ->
|
||||
NewLs = [El],
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs}),
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs, []}),
|
||||
ok
|
||||
end.
|
||||
|
||||
-spec handle_delete(atom(), atom(), hook()) -> ok.
|
||||
handle_delete(Hook, Host, El) ->
|
||||
case ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls}] ->
|
||||
[{_, Ls, Subs}] ->
|
||||
NewLs = lists:delete(El, Ls),
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs}),
|
||||
ets:insert(hooks, {{Hook, Host}, NewLs, Subs}),
|
||||
ok;
|
||||
[] ->
|
||||
ok
|
||||
end.
|
||||
|
||||
-spec handle_subscribe(atom(), atom(), subscriber()) -> ok.
|
||||
handle_subscribe(Hook, Host, El) ->
|
||||
case ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls, Subs}] ->
|
||||
case lists:member(El, Subs) of
|
||||
true ->
|
||||
ok;
|
||||
false ->
|
||||
ets:insert(hooks, {{Hook, Host}, Ls, Subs ++ [El]}),
|
||||
ok
|
||||
end;
|
||||
[] ->
|
||||
ets:insert(hooks, {{Hook, Host}, [], [El]}),
|
||||
ok
|
||||
end.
|
||||
|
||||
-spec handle_unsubscribe(atom(), atom(), subscriber()) -> ok.
|
||||
handle_unsubscribe(Hook, Host, El) ->
|
||||
case ets:lookup(hooks, {Hook, Host}) of
|
||||
[{_, Ls, Subs}] ->
|
||||
ets:insert(hooks, {{Hook, Host}, Ls, lists:delete(El, Subs)}),
|
||||
ok;
|
||||
[] ->
|
||||
ok
|
||||
@@ -310,6 +412,40 @@ run_fold1([{_Seq, Module, Function} | Ls], Hook, Val, Args) ->
|
||||
run_fold1(Ls, Hook, NewVal, Args)
|
||||
end.
|
||||
|
||||
-spec run1([hook()], atom(), list(), binary() | global, [subscriber()]) -> [subscriber()].
|
||||
run1([], _Hook, _Args, _Host, SubscriberList) ->
|
||||
SubscriberList;
|
||||
run1([{Seq, Module, Function} | Ls], Hook, Args, Host, SubscriberList) ->
|
||||
SubscriberList2 = call_subscriber_list(SubscriberList, Host, Hook, {Module, Function, Seq, Args}, before_callback, []),
|
||||
Res = safe_apply(Hook, Module, Function, Args),
|
||||
SubscriberList3 = call_subscriber_list(SubscriberList2, Host, Hook, {Module, Function, Seq, Args}, after_callback, []),
|
||||
case Res of
|
||||
'EXIT' ->
|
||||
run1(Ls, Hook, Args, Host, SubscriberList3);
|
||||
stop ->
|
||||
SubscriberList3;
|
||||
_ ->
|
||||
run1(Ls, Hook, Args, Host, SubscriberList3)
|
||||
end.
|
||||
|
||||
-spec run_fold1([hook()], atom(), T, list(), binary() | global, [subscriber()]) -> {T, [subscriber()]}.
|
||||
run_fold1([], _Hook, Val, _Args, _Host, SubscriberList) ->
|
||||
{Val, SubscriberList};
|
||||
run_fold1([{Seq, Module, Function} | Ls], Hook, Val, Args, Host, SubscriberList) ->
|
||||
SubscriberList2 = call_subscriber_list(SubscriberList, Host, Hook, {Module, Function, Seq, [Val | Args]}, before_callback, []),
|
||||
Res = safe_apply(Hook, Module, Function, [Val | Args]),
|
||||
SubscriberList3 = call_subscriber_list(SubscriberList2, Host, Hook, {Module, Function, Seq, [Val | Args]}, after_callback, []),
|
||||
case Res of
|
||||
'EXIT' ->
|
||||
run_fold1(Ls, Hook, Val, Args, Host, SubscriberList3);
|
||||
stop ->
|
||||
{Val, SubscriberList3};
|
||||
{stop, NewVal} ->
|
||||
{NewVal, SubscriberList3};
|
||||
NewVal ->
|
||||
run_fold1(Ls, Hook, NewVal, Args, Host, SubscriberList3)
|
||||
end.
|
||||
|
||||
-spec safe_apply(atom(), atom(), atom() | fun(), list()) -> any().
|
||||
safe_apply(Hook, Module, Function, Args) ->
|
||||
?DEBUG("Running hook ~p: ~p:~p/~B",
|
||||
@@ -332,6 +468,32 @@ safe_apply(Hook, Module, Function, Args) ->
|
||||
'EXIT'
|
||||
end.
|
||||
|
||||
-spec call_subscriber_list([subscriber()], binary() | global, atom(), {atom(), atom(), integer(), list()} | list(), subscriber_event(), [subscriber()]) -> any().
|
||||
call_subscriber_list([], _Host, _Hook, _CallbackOrArgs, _Event, []) ->
|
||||
[];
|
||||
call_subscriber_list([], _Host, _Hook, _CallbackOrArgs, _Event, Result) ->
|
||||
lists:reverse(Result);
|
||||
call_subscriber_list([{Mod, Func, InitArg} | SubscriberList], Host, Hook, CallbackOrArgs, Event, Result) ->
|
||||
SubscriberArgs = [InitArg, Event, Host, Hook, CallbackOrArgs],
|
||||
?DEBUG("Running hook subsciber ~p: ~p:~p/~B with event ~p",
|
||||
[Hook, Mod, Func, length(SubscriberArgs), Event]),
|
||||
try apply(Mod, Func, SubscriberArgs) of
|
||||
State ->
|
||||
call_subscriber_list(SubscriberList, Host, Hook, CallbackOrArgs, Event, [{Mod, Func, State} | Result])
|
||||
catch ?EX_RULE(E, R, St) when E /= exit; R /= normal ->
|
||||
Stack = ?EX_STACK(St),
|
||||
?ERROR_MSG("Hook subscriber ~p crashed when running ~p:~p/~p:~n" ++
|
||||
string:join(
|
||||
["** ~ts"|
|
||||
["** Arg " ++ integer_to_list(I) ++ " = ~p"
|
||||
|| I <- lists:seq(1, length(SubscriberArgs))]],
|
||||
"~n"),
|
||||
[Hook, Mod, Func, length(SubscriberArgs),
|
||||
misc:format_exception(2, E, R, Stack)|SubscriberArgs]),
|
||||
%% Do not append subscriber for next calls:
|
||||
call_subscriber_list(SubscriberList, Host, Hook, CallbackOrArgs, Event, Result)
|
||||
end.
|
||||
|
||||
%%%----------------------------------------------------------------------
|
||||
%%% Internal tracing functions
|
||||
%%%----------------------------------------------------------------------
|
||||
@@ -453,41 +615,45 @@ do_get_tracing_options(Hook, Host, MaybeMap) ->
|
||||
end
|
||||
end.
|
||||
|
||||
run2([], Hook, Args, Host, Opts) ->
|
||||
run2([], Hook, Args, Host, Opts, SubscriberList) ->
|
||||
foreach_stop_hook_tracing(Opts, Hook, Host, Args, undefined),
|
||||
ok;
|
||||
run2([{Seq, Module, Function} | Ls], Hook, Args, Host, TracingOpts) ->
|
||||
SubscriberList;
|
||||
run2([{Seq, Module, Function} | Ls], Hook, Args, Host, TracingOpts, SubscriberList) ->
|
||||
foreach_start_callback_tracing(TracingOpts, Hook, Host, Module, Function, Args, Seq),
|
||||
SubscriberList2 = call_subscriber_list(SubscriberList, Host, Hook, {Module, Function, Seq, Args}, before_callback, []),
|
||||
Res = safe_apply(Hook, Module, Function, Args),
|
||||
SubscriberList3 = call_subscriber_list(SubscriberList2, Host, Hook, {Module, Function, Seq, Args}, after_callback, []),
|
||||
foreach_stop_callback_tracing(TracingOpts, Hook, Host, Module, Function, Args, Seq, Res),
|
||||
case Res of
|
||||
'EXIT' ->
|
||||
run2(Ls, Hook, Args, Host, TracingOpts);
|
||||
run2(Ls, Hook, Args, Host, TracingOpts, SubscriberList3);
|
||||
stop ->
|
||||
foreach_stop_hook_tracing(TracingOpts, Hook, Host, Args, {Module, Function, Seq, Ls}),
|
||||
ok;
|
||||
SubscriberList3;
|
||||
_ ->
|
||||
run2(Ls, Hook, Args, Host, TracingOpts)
|
||||
run2(Ls, Hook, Args, Host, TracingOpts, SubscriberList3)
|
||||
end.
|
||||
|
||||
run_fold2([], Hook, Val, Args, Host, Opts) ->
|
||||
run_fold2([], Hook, Val, Args, Host, Opts, SubscriberList) ->
|
||||
fold_stop_hook_tracing(Opts, Hook, Host, [Val | Args], undefined),
|
||||
Val;
|
||||
run_fold2([{Seq, Module, Function} | Ls], Hook, Val, Args, Host, TracingOpts) ->
|
||||
{Val, SubscriberList};
|
||||
run_fold2([{Seq, Module, Function} | Ls], Hook, Val, Args, Host, TracingOpts, SubscriberList) ->
|
||||
fold_start_callback_tracing(TracingOpts, Hook, Host, Module, Function, [Val | Args], Seq),
|
||||
SubscriberList2 = call_subscriber_list(SubscriberList, Host, Hook, {Module, Function, Seq, [Val | Args]}, before_callback, []),
|
||||
Res = safe_apply(Hook, Module, Function, [Val | Args]),
|
||||
SubscriberList3 = call_subscriber_list(SubscriberList2, Host, Hook, {Module, Function, Seq, [Val | Args]}, after_callback, []),
|
||||
fold_stop_callback_tracing(TracingOpts, Hook, Host, Module, Function, [Val | Args], Seq, Res),
|
||||
case Res of
|
||||
'EXIT' ->
|
||||
run_fold2(Ls, Hook, Val, Args, Host, TracingOpts);
|
||||
run_fold2(Ls, Hook, Val, Args, Host, TracingOpts, SubscriberList3);
|
||||
stop ->
|
||||
fold_stop_hook_tracing(TracingOpts, Hook, Host, [Val | Args], {Module, Function, Seq, {old, Val}, Ls}),
|
||||
Val;
|
||||
{Val, SubscriberList3};
|
||||
{stop, NewVal} ->
|
||||
fold_stop_hook_tracing(TracingOpts, Hook, Host, [Val | Args], {Module, Function, Seq, {new, NewVal}, Ls}),
|
||||
NewVal;
|
||||
{NewVal, SubscriberList3};
|
||||
NewVal ->
|
||||
run_fold2(Ls, Hook, NewVal, Args, Host, TracingOpts)
|
||||
run_fold2(Ls, Hook, NewVal, Args, Host, TracingOpts, SubscriberList3)
|
||||
end.
|
||||
|
||||
foreach_start_hook_tracing(TracingOpts, Hook, Host, Args) ->
|
||||
|
||||
+10
-1
@@ -370,7 +370,16 @@ console_template() ->
|
||||
andalso
|
||||
'Elixir.System':version() >= <<"1.15">> of
|
||||
true ->
|
||||
[date, " ", time, " [", level, "] ", message, "\n"];
|
||||
{ok, DC} = logger:get_handler_config(default),
|
||||
MessageFormat = case maps:get(formatter, DC) of
|
||||
%% https://hexdocs.pm/logger/1.17.2/Logger.Formatter.html#module-formatting
|
||||
{'Elixir.Logger.Formatter', _} ->
|
||||
message;
|
||||
%% https://www.erlang.org/doc/apps/kernel/logger_formatter#t:template/0
|
||||
{logger_formatter, _} ->
|
||||
msg
|
||||
end,
|
||||
[date, " ", time, " [", level, "] ", MessageFormat, "\n"];
|
||||
false ->
|
||||
[time, " [", level, "] " | msg()]
|
||||
end.
|
||||
|
||||
@@ -164,6 +164,7 @@
|
||||
-export([sql_username/0, sql_username/1]).
|
||||
-export([trusted_proxies/0]).
|
||||
-export([update_sql_schema/0]).
|
||||
-export([update_sql_schema_timeout/0, update_sql_schema_timeout/1]).
|
||||
-export([use_cache/0, use_cache/1]).
|
||||
-export([validate_stream/0]).
|
||||
-export([version/0]).
|
||||
@@ -1109,6 +1110,13 @@ trusted_proxies() ->
|
||||
update_sql_schema() ->
|
||||
ejabberd_config:get_option({update_sql_schema, global}).
|
||||
|
||||
-spec update_sql_schema_timeout() -> 'infinity' | pos_integer().
|
||||
update_sql_schema_timeout() ->
|
||||
update_sql_schema_timeout(global).
|
||||
-spec update_sql_schema_timeout(global | binary()) -> 'infinity' | pos_integer().
|
||||
update_sql_schema_timeout(Host) ->
|
||||
ejabberd_config:get_option({update_sql_schema_timeout, Host}).
|
||||
|
||||
-spec use_cache() -> boolean().
|
||||
use_cache() ->
|
||||
use_cache(global).
|
||||
|
||||
@@ -117,7 +117,7 @@ opt_type(captcha_cmd) ->
|
||||
fun(V) ->
|
||||
V2 = misc:expand_keyword(<<"@SEMVER@">>, V,
|
||||
ejabberd_option:version()),
|
||||
misc:expand_keyword(<<"@VERSION">>, V2,
|
||||
misc:expand_keyword(<<"@VERSION@">>, V2,
|
||||
misc:semver_to_xxyy(ejabberd_option:version()))
|
||||
end);
|
||||
opt_type(captcha_host) ->
|
||||
@@ -264,6 +264,8 @@ opt_type(new_sql_schema) ->
|
||||
econf:bool();
|
||||
opt_type(update_sql_schema) ->
|
||||
econf:bool();
|
||||
opt_type(update_sql_schema_timeout) ->
|
||||
econf:timeout(second, infinity);
|
||||
opt_type(oauth_access) ->
|
||||
econf:acl();
|
||||
opt_type(oauth_cache_life_time) ->
|
||||
@@ -613,6 +615,7 @@ options() ->
|
||||
{net_ticktime, timer:seconds(60)},
|
||||
{new_sql_schema, ?USE_NEW_SQL_SCHEMA_DEFAULT},
|
||||
{update_sql_schema, true},
|
||||
{update_sql_schema_timeout, timer:minutes(5)},
|
||||
{oauth_access, none},
|
||||
{oauth_cache_life_time,
|
||||
fun(Host) -> ejabberd_config:get_option({cache_life_time, Host}) end},
|
||||
|
||||
@@ -929,6 +929,12 @@ doc() ->
|
||||
"This option was added in ejabberd 23.10, "
|
||||
"and enabled by default since 24.06. "
|
||||
"The default value is 'true'.")}},
|
||||
{update_sql_schema_timeout,
|
||||
#{value => "timeout()",
|
||||
note => "added in 24.07",
|
||||
desc =>
|
||||
?T("Time allocated to SQL schema update queries. "
|
||||
"The default value is set to 5 minutes.")}},
|
||||
{oauth_access,
|
||||
#{value => ?T("AccessName"),
|
||||
desc => ?T("By default creating OAuth tokens is not allowed. "
|
||||
|
||||
+44
-23
@@ -32,9 +32,12 @@
|
||||
%% External exports
|
||||
-export([start_link/2,
|
||||
sql_query/2,
|
||||
sql_query/3,
|
||||
sql_query_t/1,
|
||||
sql_transaction/2,
|
||||
sql_transaction/4,
|
||||
sql_bloc/2,
|
||||
sql_bloc/3,
|
||||
abort/1,
|
||||
restart/1,
|
||||
use_new_schema/0,
|
||||
@@ -84,7 +87,8 @@
|
||||
reconnect_count = 0 :: non_neg_integer(),
|
||||
host :: binary(),
|
||||
pending_requests :: p1_queue:queue(),
|
||||
overload_reported :: undefined | integer()}).
|
||||
overload_reported :: undefined | integer(),
|
||||
timeout :: pos_integer()}).
|
||||
|
||||
-define(STATE_KEY, ejabberd_sql_state).
|
||||
-define(NESTING_KEY, ejabberd_sql_nesting_level).
|
||||
@@ -120,35 +124,48 @@ start_link(Host, I) ->
|
||||
p1_fsm:start_link({local, Proc}, ?MODULE, [Host],
|
||||
fsm_limit_opts() ++ ?FSMOPTS).
|
||||
|
||||
-spec sql_query(binary(), sql_query(T), pos_integer()) -> sql_query_result(T).
|
||||
sql_query(Host, Query, Timeout) ->
|
||||
sql_call(Host, {sql_query, Query}, Timeout).
|
||||
|
||||
-spec sql_query(binary(), sql_query(T)) -> sql_query_result(T).
|
||||
sql_query(Host, Query) ->
|
||||
sql_call(Host, {sql_query, Query}).
|
||||
sql_query(Host, Query, query_timeout(Host)).
|
||||
|
||||
%% SQL transaction based on a list of queries
|
||||
%% This function automatically
|
||||
-spec sql_transaction(binary(), [sql_query(T)] | fun(() -> T)) ->
|
||||
-spec sql_transaction(binary(), [sql_query(T)] | fun(() -> T), pos_integer(), pos_integer()) ->
|
||||
{atomic, T} |
|
||||
{aborted, any()}.
|
||||
sql_transaction(Host, Queries)
|
||||
sql_transaction(Host, Queries, Timeout, Restarts)
|
||||
when is_list(Queries) ->
|
||||
F = fun () ->
|
||||
lists:foreach(fun (Query) -> sql_query_t(Query) end,
|
||||
Queries)
|
||||
end,
|
||||
sql_transaction(Host, F);
|
||||
sql_transaction(Host, F, Timeout, Restarts);
|
||||
%% SQL transaction, based on a erlang anonymous function (F = fun)
|
||||
sql_transaction(Host, F) when is_function(F) ->
|
||||
case sql_call(Host, {sql_transaction, F}) of
|
||||
sql_transaction(Host, F, Timeout, Restarts) when is_function(F) ->
|
||||
case sql_call(Host, {sql_transaction, F, Restarts}, Timeout) of
|
||||
{atomic, _} = Ret -> Ret;
|
||||
{aborted, _} = Ret -> Ret;
|
||||
Err -> {aborted, Err}
|
||||
end.
|
||||
|
||||
%% SQL bloc, based on a erlang anonymous function (F = fun)
|
||||
sql_bloc(Host, F) -> sql_call(Host, {sql_bloc, F}).
|
||||
-spec sql_transaction(binary(), [sql_query(T)] | fun(() -> T)) ->
|
||||
{atomic, T} |
|
||||
{aborted, any()}.
|
||||
sql_transaction(Host, Queries) ->
|
||||
sql_transaction(Host, Queries, query_timeout(Host), ?MAX_TRANSACTION_RESTARTS).
|
||||
|
||||
sql_call(Host, Msg) ->
|
||||
Timeout = query_timeout(Host),
|
||||
%% SQL bloc, based on a erlang anonymous function (F = fun)
|
||||
sql_bloc(Host, F, Timeout) ->
|
||||
sql_call(Host, {sql_bloc, F}, Timeout).
|
||||
|
||||
sql_bloc(Host, F) ->
|
||||
sql_bloc(Host, F, query_timeout(Host)).
|
||||
|
||||
sql_call(Host, Msg, Timeout) ->
|
||||
case get(?STATE_KEY) of
|
||||
undefined ->
|
||||
sync_send_event(Host,
|
||||
@@ -355,7 +372,8 @@ init([Host]) ->
|
||||
QueueType = ejabberd_option:sql_queue_type(Host),
|
||||
{ok, connecting,
|
||||
#state{db_type = DBType, host = Host,
|
||||
pending_requests = p1_queue:new(QueueType, max_fsm_queue())}}.
|
||||
pending_requests = p1_queue:new(QueueType, max_fsm_queue()),
|
||||
timeout = query_timeout(Host)}}.
|
||||
|
||||
connecting(connect, #state{host = Host} = State) ->
|
||||
ConnectRes = case db_opts(Host) of
|
||||
@@ -496,10 +514,12 @@ handle_reconnect(Reason, #state{host = Host, reconnect_count = RC} = State) ->
|
||||
_ -> ok
|
||||
end,
|
||||
p1_fsm:send_event_after(StartInterval, connect),
|
||||
{next_state, connecting, State#state{reconnect_count = RC + 1}}.
|
||||
{next_state, connecting, State#state{reconnect_count = RC + 1,
|
||||
timeout = query_timeout(Host)}}.
|
||||
|
||||
run_sql_cmd(Command, From, State, Timestamp) ->
|
||||
case current_time() >= Timestamp of
|
||||
CT = current_time(),
|
||||
case CT >= Timestamp of
|
||||
true ->
|
||||
State1 = report_overload(State),
|
||||
{next_state, session_established, State1};
|
||||
@@ -510,30 +530,31 @@ run_sql_cmd(Command, From, State, Timestamp) ->
|
||||
State#state.pending_requests),
|
||||
handle_reconnect(Reason, State#state{pending_requests = PR})
|
||||
after 0 ->
|
||||
Timeout = min(query_timeout(State#state.host), Timestamp - CT),
|
||||
put(?NESTING_KEY, ?TOP_LEVEL_TXN),
|
||||
put(?STATE_KEY, State),
|
||||
put(?STATE_KEY, State#state{timeout = Timeout}),
|
||||
abort_on_driver_error(outer_op(Command), From, Timestamp)
|
||||
end
|
||||
end.
|
||||
|
||||
%% @doc Only called by handle_call, only handles top level operations.
|
||||
-spec outer_op(Op::{atom(), binary()}) ->
|
||||
-spec outer_op(Op::{atom(), binary()} | {sql_transaction, binary(), pos_integer()}) ->
|
||||
{error, Reason::binary()} | {aborted, Reason::binary()} | {atomic, Result::any()}.
|
||||
outer_op({sql_query, Query}) ->
|
||||
sql_query_internal(Query);
|
||||
outer_op({sql_transaction, F}) ->
|
||||
outer_transaction(F, ?MAX_TRANSACTION_RESTARTS, <<"">>);
|
||||
outer_op({sql_transaction, F, Restarts}) ->
|
||||
outer_transaction(F, Restarts, <<"">>);
|
||||
outer_op({sql_bloc, F}) -> execute_bloc(F).
|
||||
|
||||
%% Called via sql_query/transaction/bloc from client code when inside a
|
||||
%% nested operation
|
||||
nested_op({sql_query, Query}) ->
|
||||
sql_query_internal(Query);
|
||||
nested_op({sql_transaction, F}) ->
|
||||
nested_op({sql_transaction, F, Restarts}) ->
|
||||
NestingLevel = get(?NESTING_KEY),
|
||||
if NestingLevel =:= (?TOP_LEVEL_TXN) ->
|
||||
outer_transaction(F, ?MAX_TRANSACTION_RESTARTS, <<"">>);
|
||||
true -> inner_transaction(F)
|
||||
outer_transaction(F, Restarts, <<"">>);
|
||||
true -> inner_transaction(F)
|
||||
end;
|
||||
nested_op({sql_bloc, F}) -> execute_bloc(F).
|
||||
|
||||
@@ -595,7 +616,7 @@ outer_transaction(F, NRestarts, _Reason) ->
|
||||
[?MAX_TRANSACTION_RESTARTS, Reason,
|
||||
StackTrace, get(?STATE_KEY)]),
|
||||
maybe_restart_transaction(F, NRestarts, Reason, true);
|
||||
?EX_RULE(exit, Reason, _) ->
|
||||
?EX_RULE(_, Reason, _) ->
|
||||
maybe_restart_transaction(F, 0, Reason, true)
|
||||
end
|
||||
end.
|
||||
@@ -726,7 +747,7 @@ sql_query_internal(F) when is_function(F) ->
|
||||
sql_query_internal(Query) ->
|
||||
State = get(?STATE_KEY),
|
||||
?DEBUG("SQL: \"~ts\"", [Query]),
|
||||
QueryTimeout = query_timeout(State#state.host),
|
||||
QueryTimeout = State#state.timeout,
|
||||
Res = case State#state.db_type of
|
||||
odbc ->
|
||||
to_odbc(odbc:sql_query(State#state.db_ref, [Query],
|
||||
|
||||
+237
-237
@@ -226,6 +226,13 @@ store_version(Host, Module, Version) ->
|
||||
["!module=%(SModule)s",
|
||||
"version=%(Version)d"]).
|
||||
|
||||
store_version_t(Module, Version) ->
|
||||
SModule = misc:atom_to_binary(Module),
|
||||
?SQL_UPSERT_T(
|
||||
"schema_version",
|
||||
["!module=%(SModule)s",
|
||||
"version=%(Version)d"]).
|
||||
|
||||
table_exists(Host, Table) ->
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
@@ -398,28 +405,25 @@ get_current_version(Host, Module, Schemas) ->
|
||||
Version
|
||||
end.
|
||||
|
||||
sqlite_table_copy(Host, SchemaInfo, Table) ->
|
||||
ejabberd_sql:sql_transaction(Host,
|
||||
fun() ->
|
||||
TableName = Table#sql_table.name,
|
||||
NewTableName = <<"new_", TableName/binary>>,
|
||||
NewTable = Table#sql_table{name = NewTableName},
|
||||
create_table_t(SchemaInfo, NewTable),
|
||||
SQL2 = <<"INSERT INTO ", NewTableName/binary,
|
||||
" SELECT * FROM ", TableName/binary>>,
|
||||
?INFO_MSG("Copying table ~s to ~s:~n~s~n",
|
||||
[TableName, NewTableName, SQL2]),
|
||||
ejabberd_sql:sql_query_t(SQL2),
|
||||
SQL3 = <<"DROP TABLE ", TableName/binary>>,
|
||||
?INFO_MSG("Droping old table ~s:~n~s~n",
|
||||
[TableName, SQL2]),
|
||||
ejabberd_sql:sql_query_t(SQL3),
|
||||
SQL4 = <<"ALTER TABLE ", NewTableName/binary,
|
||||
" RENAME TO ", TableName/binary>>,
|
||||
?INFO_MSG("Renameing table ~s to ~s:~n~s~n",
|
||||
[NewTableName, TableName, SQL4]),
|
||||
ejabberd_sql:sql_query_t(SQL4)
|
||||
end).
|
||||
sqlite_table_copy_t(SchemaInfo, Table) ->
|
||||
TableName = Table#sql_table.name,
|
||||
NewTableName = <<"new_", TableName/binary>>,
|
||||
NewTable = Table#sql_table{name = NewTableName},
|
||||
create_table_t(SchemaInfo, NewTable),
|
||||
SQL2 = <<"INSERT INTO ", NewTableName/binary,
|
||||
" SELECT * FROM ", TableName/binary>>,
|
||||
?INFO_MSG("Copying table ~s to ~s:~n~s~n",
|
||||
[TableName, NewTableName, SQL2]),
|
||||
ejabberd_sql:sql_query_t(SQL2),
|
||||
SQL3 = <<"DROP TABLE ", TableName/binary>>,
|
||||
?INFO_MSG("Droping old table ~s:~n~s~n",
|
||||
[TableName, SQL2]),
|
||||
ejabberd_sql:sql_query_t(SQL3),
|
||||
SQL4 = <<"ALTER TABLE ", NewTableName/binary,
|
||||
" RENAME TO ", TableName/binary>>,
|
||||
?INFO_MSG("Renameing table ~s to ~s:~n~s~n",
|
||||
[NewTableName, TableName, SQL4]),
|
||||
ejabberd_sql:sql_query_t(SQL4).
|
||||
|
||||
format_type(#sql_schema_info{db_type = pgsql}, Column) ->
|
||||
case Column#sql_column.type of
|
||||
@@ -875,18 +879,18 @@ update_schema(Host, Module, RawSchemas) ->
|
||||
end.
|
||||
|
||||
do_update_schema(Host, Module, SchemaInfo, Schema) ->
|
||||
lists:foreach(
|
||||
fun({add_column, TableName, ColumnName}) ->
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Column} =
|
||||
lists:keysearch(
|
||||
ColumnName, #sql_column.name, Table#sql_table.columns),
|
||||
Res =
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun(DBType, _DBVersion) ->
|
||||
F = fun() ->
|
||||
lists:foreach(
|
||||
fun({add_column, TableName, ColumnName}) ->
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Column} =
|
||||
lists:keysearch(
|
||||
ColumnName, #sql_column.name, Table#sql_table.columns),
|
||||
Res =
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun(DBType, _DBVersion) ->
|
||||
Def = format_column_def(SchemaInfo, Column),
|
||||
Default = format_default(SchemaInfo, Column),
|
||||
SQLs =
|
||||
@@ -911,209 +915,205 @@ do_update_schema(Host, Module, SchemaInfo, Schema) ->
|
||||
ColumnName,
|
||||
SQLs]),
|
||||
lists:foreach(
|
||||
fun(SQL) -> ejabberd_sql:sql_query_t(SQL) end,
|
||||
SQLs)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({drop_column, TableName, ColumnName}) ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun(_DBType, _DBVersion) ->
|
||||
SQL = [<<"ALTER TABLE ">>,
|
||||
TableName,
|
||||
<<" DROP COLUMN ">>,
|
||||
ColumnName,
|
||||
<<";">>],
|
||||
?INFO_MSG("Drop column ~s/~s:~n~s~n",
|
||||
[TableName,
|
||||
ColumnName,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({create_index, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Index} =
|
||||
lists:keysearch(
|
||||
Columns, #sql_index.columns, Table#sql_table.indices),
|
||||
case Index#sql_index.meta of
|
||||
#{ignore := true} -> ok;
|
||||
_ ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun() ->
|
||||
case Index#sql_index.meta of
|
||||
#{primary_key := true} ->
|
||||
SQL1 = format_add_primary_key(
|
||||
SchemaInfo, Table, Index),
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Add primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL);
|
||||
_ ->
|
||||
SQL1 = format_create_index(
|
||||
SchemaInfo, Table, Index),
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Create index ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end;
|
||||
({update_primary_key, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Index} =
|
||||
lists:keysearch(
|
||||
Columns, #sql_index.columns, Table#sql_table.indices),
|
||||
Res =
|
||||
case SchemaInfo#sql_schema_info.db_type of
|
||||
sqlite ->
|
||||
sqlite_table_copy(Host, SchemaInfo, Table);
|
||||
pgsql ->
|
||||
TableName = Table#sql_table.name,
|
||||
SQL1 = [<<"ALTER TABLE ">>, TableName, <<" DROP CONSTRAINT ",
|
||||
TableName/binary,"_pkey, ",
|
||||
"ADD PRIMARY KEY (">>,
|
||||
lists:join(
|
||||
<<", ">>,
|
||||
Index#sql_index.columns),
|
||||
<<");">>],
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Update primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun(_DBType, _DBVersion) ->
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end);
|
||||
mysql ->
|
||||
TableName = Table#sql_table.name,
|
||||
SQL1 = [<<"ALTER TABLE ">>, TableName, <<" DROP PRIMARY KEY, "
|
||||
"ADD PRIMARY KEY (">>,
|
||||
lists:join(
|
||||
<<", ">>,
|
||||
lists:map(
|
||||
fun(Col) ->
|
||||
format_mysql_index_column(Table, Col)
|
||||
end, Index#sql_index.columns)),
|
||||
<<");">>],
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Update primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun(_DBType, _DBVersion) ->
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end)
|
||||
end,
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({drop_index, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
case find_index_name(Host, TableName, Columns) of
|
||||
false ->
|
||||
?ERROR_MSG("Can't find an index to drop for ~s/~p",
|
||||
[TableName, Columns]);
|
||||
{ok, IndexName} ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query(
|
||||
Host,
|
||||
fun(DBType, _DBVersion) ->
|
||||
SQL =
|
||||
case DBType of
|
||||
mysql ->
|
||||
[<<"DROP INDEX ">>,
|
||||
IndexName,
|
||||
<<" ON ">>,
|
||||
TableName,
|
||||
<<";">>];
|
||||
_ ->
|
||||
[<<"DROP INDEX ">>,
|
||||
IndexName, <<";">>]
|
||||
end,
|
||||
?INFO_MSG("Drop index ~s/~p:~n~s~n",
|
||||
[TableName,
|
||||
Columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end
|
||||
end, Schema#sql_schema.update),
|
||||
store_version(Host, Module, Schema#sql_schema.version).
|
||||
|
||||
fun(SQL) -> ejabberd_sql:sql_query_t(SQL) end,
|
||||
SQLs)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({drop_column, TableName, ColumnName}) ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun(_DBType, _DBVersion) ->
|
||||
SQL = [<<"ALTER TABLE ">>,
|
||||
TableName,
|
||||
<<" DROP COLUMN ">>,
|
||||
ColumnName,
|
||||
<<";">>],
|
||||
?INFO_MSG("Drop column ~s/~s:~n~s~n",
|
||||
[TableName,
|
||||
ColumnName,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({create_index, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Index} =
|
||||
lists:keysearch(
|
||||
Columns, #sql_index.columns, Table#sql_table.indices),
|
||||
case Index#sql_index.meta of
|
||||
#{ignore := true} -> ok;
|
||||
_ ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun() ->
|
||||
case Index#sql_index.meta of
|
||||
#{primary_key := true} ->
|
||||
SQL1 = format_add_primary_key(
|
||||
SchemaInfo, Table, Index),
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Add primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL);
|
||||
_ ->
|
||||
SQL1 = format_create_index(
|
||||
SchemaInfo, Table, Index),
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Create index ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end;
|
||||
({update_primary_key, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
{value, Table} =
|
||||
lists:keysearch(
|
||||
TableName, #sql_table.name, Schema#sql_schema.tables),
|
||||
{value, Index} =
|
||||
lists:keysearch(
|
||||
Columns, #sql_index.columns, Table#sql_table.indices),
|
||||
Res =
|
||||
case SchemaInfo#sql_schema_info.db_type of
|
||||
sqlite ->
|
||||
sqlite_table_copy_t(SchemaInfo, Table);
|
||||
pgsql ->
|
||||
TableName = Table#sql_table.name,
|
||||
SQL1 = [<<"ALTER TABLE ">>, TableName, <<" DROP CONSTRAINT ",
|
||||
TableName/binary, "_pkey, ",
|
||||
"ADD PRIMARY KEY (">>,
|
||||
lists:join(
|
||||
<<", ">>,
|
||||
Index#sql_index.columns),
|
||||
<<");">>],
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Update primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun(_DBType, _DBVersion) ->
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end);
|
||||
mysql ->
|
||||
TableName = Table#sql_table.name,
|
||||
SQL1 = [<<"ALTER TABLE ">>, TableName, <<" DROP PRIMARY KEY, "
|
||||
"ADD PRIMARY KEY (">>,
|
||||
lists:join(
|
||||
<<", ">>,
|
||||
lists:map(
|
||||
fun(Col) ->
|
||||
format_mysql_index_column(Table, Col)
|
||||
end, Index#sql_index.columns)),
|
||||
<<");">>],
|
||||
SQL = iolist_to_binary(SQL1),
|
||||
?INFO_MSG("Update primary key ~s/~p:~n~s~n",
|
||||
[Table#sql_table.name,
|
||||
Index#sql_index.columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun(_DBType, _DBVersion) ->
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end)
|
||||
end,
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
({drop_index, TableName, Columns1}) ->
|
||||
Columns =
|
||||
case ejabberd_sql:use_new_schema() of
|
||||
true ->
|
||||
Columns1;
|
||||
false ->
|
||||
lists:delete(
|
||||
<<"server_host">>, Columns1)
|
||||
end,
|
||||
case find_index_name(Host, TableName, Columns) of
|
||||
false ->
|
||||
?ERROR_MSG("Can't find an index to drop for ~s/~p",
|
||||
[TableName, Columns]);
|
||||
{ok, IndexName} ->
|
||||
Res =
|
||||
ejabberd_sql:sql_query_t(
|
||||
fun(DBType, _DBVersion) ->
|
||||
SQL =
|
||||
case DBType of
|
||||
mysql ->
|
||||
[<<"DROP INDEX ">>,
|
||||
IndexName,
|
||||
<<" ON ">>,
|
||||
TableName,
|
||||
<<";">>];
|
||||
_ ->
|
||||
[<<"DROP INDEX ">>,
|
||||
IndexName, <<";">>]
|
||||
end,
|
||||
?INFO_MSG("Drop index ~s/~p:~n~s~n",
|
||||
[TableName,
|
||||
Columns,
|
||||
SQL]),
|
||||
ejabberd_sql:sql_query_t(SQL)
|
||||
end),
|
||||
case Res of
|
||||
{error, Error} ->
|
||||
?ERROR_MSG("Failed to update table ~s: ~p",
|
||||
[TableName, Error]),
|
||||
error(Error);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end
|
||||
end, Schema#sql_schema.update),
|
||||
store_version_t(Module, Schema#sql_schema.version)
|
||||
end,
|
||||
ejabberd_sql:sql_transaction(Host, F, ejabberd_option:update_sql_schema_timeout(), 1).
|
||||
|
||||
print_schema(SDBType, SDBVersion, SNewSchema) ->
|
||||
{DBType, DBVersion} =
|
||||
|
||||
@@ -587,7 +587,7 @@ process_admin(Host, #request{path = [<<"online-users">> | RPath], lang = Lang} =
|
||||
Res = [make_command(connected_users_vhost,
|
||||
R,
|
||||
[{<<"host">>, Host}],
|
||||
[{table_options, {2, RPath}},
|
||||
[{table_options, {100, RPath}},
|
||||
{result_links, [{sessions, user, Level, <<"">>}]}])],
|
||||
make_xhtml([?XCT(<<"h1">>, ?T("Online Users"))] ++ Res, Host, R, AJID, Level);
|
||||
process_admin(Host,
|
||||
@@ -1684,14 +1684,11 @@ make_command2(Name, Request, BaseArguments, Options) ->
|
||||
ResultLinks = proplists:get_value(result_links, Options, []),
|
||||
TO = proplists:get_value(table_options, Options, {999999, []}),
|
||||
Style = proplists:get_value(style, Options, normal),
|
||||
#request{us = {RUser, RServer},
|
||||
ip = RIp,
|
||||
host = RHost} =
|
||||
Request,
|
||||
#request{us = {RUser, RServer}, ip = RIp} = Request,
|
||||
CallerInfo =
|
||||
#{usr => {RUser, RServer, <<"">>},
|
||||
ip => RIp,
|
||||
caller_host => RHost,
|
||||
caller_host => RServer,
|
||||
caller_module => ?MODULE},
|
||||
try {ejabberd_commands:get_command_definition(Name),
|
||||
ejabberd_access_permissions:can_access(Name, CallerInfo)}
|
||||
@@ -2226,8 +2223,11 @@ make_result(Binary,
|
||||
when (ElementName == ResultName) or (ElementName == unknown_element_name) ->
|
||||
First = proplists:get_value(first, ArgumentsUsed),
|
||||
Second = proplists:get_value(second, ArgumentsUsed),
|
||||
FirstUrlencoded =
|
||||
hd(string:replace(
|
||||
misc:url_encode(First), "%40", "@")),
|
||||
{GroupId, Host} =
|
||||
case jid:decode(First) of
|
||||
case jid:decode(FirstUrlencoded) of
|
||||
#jid{luser = <<"">>, lserver = G} ->
|
||||
{G, Second};
|
||||
#jid{luser = G, lserver = H} ->
|
||||
|
||||
+44
-14
@@ -36,7 +36,7 @@
|
||||
install_contrib_modules/2,
|
||||
config_dir/0, get_commands_spec/0]).
|
||||
-export([modules_configs/0, module_ebin_dir/1]).
|
||||
-export([compile_erlang_file/2, compile_elixir_file/2]).
|
||||
-export([compile_erlang_file/2, compile_elixir_files/2]).
|
||||
-export([web_menu_node/3, web_page_node/3, webadmin_node_contrib/3]).
|
||||
|
||||
%% gen_server callbacks
|
||||
@@ -603,8 +603,7 @@ compile(LibDir) ->
|
||||
compile_c_files(LibDir),
|
||||
Er = [compile_erlang_file(Bin, File, Options)
|
||||
|| File <- filelib:wildcard(Src++"/**/*.erl")],
|
||||
Ex = [compile_elixir_file(Bin, File)
|
||||
|| File <- filelib:wildcard(Lib ++ "/**/*.ex")],
|
||||
Ex = compile_elixir_files(Bin, filelib:wildcard(Lib ++ "/**/*.ex")),
|
||||
compile_result(lists:flatten([Er, Ex])).
|
||||
|
||||
compile_c_files(LibDir) ->
|
||||
@@ -669,18 +668,34 @@ compile_erlang_file(Dest, File, ErlOptions) ->
|
||||
end.
|
||||
|
||||
-ifdef(ELIXIR_ENABLED).
|
||||
compile_elixir_file(Dest, File) when is_list(Dest) and is_list(File) ->
|
||||
compile_elixir_file(list_to_binary(Dest), list_to_binary(File));
|
||||
compile_elixir_files(_, []) ->
|
||||
ok;
|
||||
compile_elixir_files(Dest, [File | _] = Files) when is_list(Dest) and is_list(File) ->
|
||||
BinFiles = [list_to_binary(F) || F <- Files],
|
||||
compile_elixir_files(list_to_binary(Dest), BinFiles);
|
||||
|
||||
compile_elixir_file(Dest, File) ->
|
||||
try 'Elixir.Kernel.ParallelCompiler':files_to_path([File], Dest, []) of
|
||||
Modules when is_list(Modules) -> {ok, Modules}
|
||||
compile_elixir_files(Dest, Files) ->
|
||||
try 'Elixir.Kernel.ParallelCompiler':compile_to_path(Files, Dest, [{return_diagnostics, true}]) of
|
||||
{ok, Modules, []} when is_list(Modules) ->
|
||||
{ok, Modules};
|
||||
{ok, Modules, Warnings} when is_list(Modules) ->
|
||||
?WARNING_MSG("Warnings compiling module: ~n~p", [Warnings]),
|
||||
{ok, Modules}
|
||||
catch
|
||||
_ -> {error, {compilation_failed, File}}
|
||||
A:B ->
|
||||
?ERROR_MSG("Problem ~p compiling Elixir files: ~p~nFiles: ~p", [A, B, Files]),
|
||||
{error, {compilation_failed, Files}}
|
||||
end.
|
||||
-else.
|
||||
compile_elixir_file(_, File) ->
|
||||
{error, {compilation_failed, File}}.
|
||||
compile_elixir_files(_, []) ->
|
||||
ok;
|
||||
compile_elixir_files(_, Files) ->
|
||||
ErrorString = "Attempted to compile Elixir files, but Elixir support is "
|
||||
"not available in ejabberd. Try compiling ejabberd using "
|
||||
"'./configure --enable-elixir' or './configure --with-rebar=mix'",
|
||||
?ERROR_MSG(ErrorString, []),
|
||||
io:format("Error: " ++ ErrorString ++ "~n", []),
|
||||
{error, {elixir_not_available, Files}}.
|
||||
-endif.
|
||||
|
||||
install(Module, Spec, SrcDir, LibDir, Config) ->
|
||||
@@ -749,8 +764,10 @@ fetch_rebar_deps(SrcDir) ->
|
||||
{ok, CurDir} = file:get_cwd(),
|
||||
file:set_cwd(SrcDir),
|
||||
filelib:ensure_dir(filename:join("deps", ".")),
|
||||
lists:foreach(fun({_App, Cmd}) ->
|
||||
os:cmd("cd deps; "++Cmd++"; cd ..")
|
||||
lists:foreach(fun({App, Cmd}) ->
|
||||
io:format("Fetching dependency ~s: ", [App]),
|
||||
Result = os:cmd("cd deps; "++Cmd++"; cd .."),
|
||||
io:format("~s", [Result])
|
||||
end, Deps),
|
||||
file:set_cwd(CurDir)
|
||||
end.
|
||||
@@ -764,6 +781,19 @@ rebar_deps(Script) ->
|
||||
_ ->
|
||||
[]
|
||||
end.
|
||||
|
||||
rebar_dep({App, Version, Git}) when Version /= ".*" ->
|
||||
AppS = atom_to_list(App),
|
||||
Help = os:cmd("mix hex.package"),
|
||||
case string:find(Help, "mix hex.package fetch") /= nomatch of
|
||||
true ->
|
||||
{App, "mix hex.package fetch "++AppS++" "++Version++" --unpack"};
|
||||
false ->
|
||||
io:format("I'll download ~p using git because I can't use Mix "
|
||||
"to fetch from hex.pm:~n~s", [AppS, Help]),
|
||||
rebar_dep({App, ".*", Git})
|
||||
end;
|
||||
|
||||
rebar_dep({App, _, {git, Url}}) ->
|
||||
{App, "git clone "++Url++" "++filename:basename(App)};
|
||||
rebar_dep({App, _, {git, Url, {branch, Ref}}}) ->
|
||||
@@ -1195,7 +1225,7 @@ is_elixir_module(Module) ->
|
||||
filelib:wildcard(Src++"/*.{erl}")} of
|
||||
{[_ | _], []} ->
|
||||
true;
|
||||
{[], [_ | _]} ->
|
||||
{[], _} ->
|
||||
false
|
||||
end.
|
||||
|
||||
|
||||
+10
-1
@@ -42,7 +42,7 @@
|
||||
is_mucsub_message/1, best_match/2, pmap/2, peach/2, format_exception/4,
|
||||
get_my_ipv4_address/0, get_my_ipv6_address/0, parse_ip_mask/1,
|
||||
crypto_hmac/3, crypto_hmac/4, uri_parse/1, uri_parse/2, uri_quote/1,
|
||||
json_encode/1, json_decode/1,
|
||||
json_encode/1, json_decode/1, json_encode_with_kv_lists/1,
|
||||
set_proc_label/1,
|
||||
match_ip_mask/3, format_hosts_list/1, format_cycle/1, delete_dir/1,
|
||||
semver_to_xxyy/1, logical_processors/0, get_mucsub_event_type/1]).
|
||||
@@ -132,11 +132,20 @@ crypto_hmac(Type, Key, Data, MacL) -> crypto:macN(hmac, Type, Key, Data, MacL).
|
||||
-endif.
|
||||
|
||||
-ifdef(OTP_BELOW_27).
|
||||
json_encode_with_kv_lists(Term) ->
|
||||
jiffy:encode(Term).
|
||||
json_encode(Term) ->
|
||||
jiffy:encode(Term).
|
||||
json_decode(Bin) ->
|
||||
jiffy:decode(Bin, [return_maps]).
|
||||
-else.
|
||||
json_encode_with_kv_lists(Term) ->
|
||||
iolist_to_binary(json:encode(Term,
|
||||
fun([{_, _} | _] = Val, Encoder) ->
|
||||
json:encode_key_value_list(Val, Encoder);
|
||||
(Val, Encoder) ->
|
||||
json:encode_value(Val, Encoder)
|
||||
end)).
|
||||
json_encode(Term) ->
|
||||
iolist_to_binary(json:encode(Term)).
|
||||
json_decode(Bin) ->
|
||||
|
||||
@@ -1934,7 +1934,7 @@ srg_get_displayed(Group, Host) ->
|
||||
error ->
|
||||
[]
|
||||
end,
|
||||
proplists:get_value(displayed_groups, Opts).
|
||||
proplists:get_value(displayed_groups, Opts, []).
|
||||
|
||||
srg_add_displayed(Group, Host, NewGroup) ->
|
||||
Opts =
|
||||
@@ -2389,7 +2389,7 @@ mod_doc() ->
|
||||
#{desc =>
|
||||
[?T("This module provides additional administrative commands."), "",
|
||||
?T("Details for some commands:"), "",
|
||||
?T("- 'ban-acount':"),
|
||||
?T("- 'ban_account':"),
|
||||
?T("This command kicks all the connected sessions of the account "
|
||||
"from the server. It also changes their password to a randomly "
|
||||
"generated one, so they can't login anymore unless a server "
|
||||
@@ -2402,8 +2402,8 @@ mod_doc() ->
|
||||
"`C:/Program Files/ejabberd` or similar. If you use other "
|
||||
"Operating System, place the file on the same directory where "
|
||||
"the .beam files are installed. See below an example roster file."),
|
||||
?T("- 'srg-create':"),
|
||||
?T("If you want to put a group Name with blankspaces, use the "
|
||||
?T("- 'srg_create':"),
|
||||
?T("If you want to put a group Name with blank spaces, use the "
|
||||
"characters \"\' and \'\" to define when the Name starts and "
|
||||
"ends. See an example below.")],
|
||||
example =>
|
||||
@@ -2427,6 +2427,6 @@ mod_doc() ->
|
||||
"boby@example.org will be kicked, and its password will be set "
|
||||
"to something like "
|
||||
"'BANNED_ACCOUNT--20080425T21:45:07--2176635--Spammed_rooms'"),
|
||||
["ejabberdctl vhost example.org ban-account boby \"Spammed rooms\""]},
|
||||
{?T("Call to srg-create using double-quotes and single-quotes:"),
|
||||
["ejabberdctl srg-create g1 example.org \"\'Group number 1\'\" this_is_g1 g1"]}]}.
|
||||
["ejabberdctl vhost example.org ban_account boby \"Spammed rooms\""]},
|
||||
{?T("Call to srg_create using double-quotes and single-quotes:"),
|
||||
["ejabberdctl srg_create g1 example.org \"\'Group number 1\'\" this_is_g1 g1"]}]}.
|
||||
|
||||
+25
-1
@@ -332,21 +332,40 @@ format_arg({Elements},
|
||||
({Val}) when is_list(Val) ->
|
||||
format_arg({Val}, Tuple)
|
||||
end, Elements);
|
||||
format_arg(Map,
|
||||
{list, {_ElementDefName, {tuple, [{_Tuple1N, Tuple1S}, {_Tuple2N, Tuple2S}]}}})
|
||||
when is_map(Map) andalso
|
||||
(Tuple1S == binary orelse Tuple1S == string) ->
|
||||
maps:fold(
|
||||
fun(K, V, Acc) ->
|
||||
[{format_arg(K, Tuple1S), format_arg(V, Tuple2S)} | Acc]
|
||||
end, [], Map);
|
||||
format_arg(Elements,
|
||||
{list, {_ElementDefName, {list, _} = ElementDefFormat}})
|
||||
when is_list(Elements) ->
|
||||
[{format_arg(Element, ElementDefFormat)}
|
||||
|| Element <- Elements];
|
||||
|
||||
%% Covered by command_test_list and command_test_list_tuple
|
||||
format_arg(Elements,
|
||||
{list, {_ElementDefName, ElementDefFormat}})
|
||||
when is_list(Elements) ->
|
||||
[format_arg(Element, ElementDefFormat)
|
||||
|| Element <- Elements];
|
||||
|
||||
format_arg({[{Name, Value}]},
|
||||
{tuple, [{_Tuple1N, Tuple1S}, {_Tuple2N, Tuple2S}]})
|
||||
when Tuple1S == binary;
|
||||
Tuple1S == string ->
|
||||
{format_arg(Name, Tuple1S), format_arg(Value, Tuple2S)};
|
||||
|
||||
%% Covered by command_test_tuple and command_test_list_tuple
|
||||
format_arg(Elements,
|
||||
{tuple, ElementsDef})
|
||||
when is_map(Elements) ->
|
||||
list_to_tuple([element(2, maps:find(atom_to_binary(Name, latin1), Elements))
|
||||
|| {Name, _Format} <- ElementsDef]);
|
||||
|
||||
format_arg({Elements},
|
||||
{tuple, ElementsDef})
|
||||
when is_list(Elements) ->
|
||||
@@ -363,10 +382,12 @@ format_arg({Elements},
|
||||
end
|
||||
end, ElementsDef),
|
||||
list_to_tuple(F);
|
||||
|
||||
format_arg(Elements, {list, ElementsDef})
|
||||
when is_list(Elements) and is_atom(ElementsDef) ->
|
||||
[format_arg(Element, ElementsDef)
|
||||
|| Element <- Elements];
|
||||
|
||||
format_arg(Arg, integer) when is_integer(Arg) -> Arg;
|
||||
format_arg(Arg, binary) when is_list(Arg) -> process_unicode_codepoints(Arg);
|
||||
format_arg(Arg, binary) when is_binary(Arg) -> Arg;
|
||||
@@ -452,6 +473,7 @@ format_result(Els, {Name, {list, {_, {tuple, [{_, atom}, _]}} = Fmt}}) ->
|
||||
format_result(Els, {Name, {list, {_, {tuple, [{name, string}, {value, _}]}} = Fmt}}) ->
|
||||
{misc:atom_to_binary(Name), {[format_result(El, Fmt) || El <- Els]}};
|
||||
|
||||
%% Covered by command_test_list and command_test_list_tuple
|
||||
format_result(Els, {Name, {list, Def}}) ->
|
||||
{misc:atom_to_binary(Name), [element(2, format_result(El, Def)) || El <- Els]};
|
||||
|
||||
@@ -465,9 +487,11 @@ format_result(Tuple, {_Name, {tuple, [{name, string}, {value, _} = ValFmt]}}) ->
|
||||
{_, Val2} = format_result(Val, ValFmt),
|
||||
{iolist_to_binary(Name2), Val2};
|
||||
|
||||
%% Covered by command_test_tuple and command_test_list_tuple
|
||||
format_result(Tuple, {Name, {tuple, Def}}) ->
|
||||
Els = lists:zip(tuple_to_list(Tuple), Def),
|
||||
{misc:atom_to_binary(Name), {[format_result(El, ElDef) || {El, ElDef} <- Els]}};
|
||||
Els2 = [format_result(El, ElDef) || {El, ElDef} <- Els],
|
||||
{misc:atom_to_binary(Name), maps:from_list(Els2)};
|
||||
|
||||
format_result(404, {_Name, _}) ->
|
||||
"not_found".
|
||||
|
||||
+1
-1
@@ -1678,7 +1678,7 @@ mod_doc() ->
|
||||
#{value => "true | false",
|
||||
desc =>
|
||||
?T("When this option is disabled, for each individual "
|
||||
"subscriber a separa mucsub message is stored. With this "
|
||||
"subscriber a separate mucsub message is stored. With this "
|
||||
"option enabled, when a user fetches archive virtual "
|
||||
"mucsub, messages are generated from muc archives. "
|
||||
"The default value is 'false'.")}}]}.
|
||||
|
||||
@@ -673,7 +673,7 @@ get_pruned_event_id(PrunedEvent) ->
|
||||
|
||||
encode_canonical_json(JSON) ->
|
||||
JSON2 = sort_json(JSON),
|
||||
misc:json_encode(JSON2).
|
||||
misc:json_encode_with_kv_lists(JSON2).
|
||||
|
||||
sort_json(#{} = Map) ->
|
||||
Map2 = maps:map(fun(_K, V) ->
|
||||
@@ -924,10 +924,10 @@ mod_doc() ->
|
||||
{matrix_id_as_jid,
|
||||
#{value => "true | false",
|
||||
desc =>
|
||||
?T("If set to 'false', all packets failing to be delivered via an XMPP "
|
||||
?T("If set to 'true', all packets failing to be delivered via an XMPP "
|
||||
"server-to-server connection will then be routed to the Matrix gateway "
|
||||
"by translating a Jabber ID 'user@matrixdomain.tld' to a Matrix user "
|
||||
"identifier '@user:matrixdomain.tld'. When set to 'true', messages "
|
||||
"identifier '@user:matrixdomain.tld'. When set to 'false', messages "
|
||||
"must be explicitly sent to the matrix gateway service Jabber ID to be "
|
||||
"routed to a remote Matrix server. In this case, to send a message to "
|
||||
"Matrix user '@user:matrixdomain.tld', the client must send a message "
|
||||
|
||||
+1
-1
@@ -1582,7 +1582,7 @@ mod_doc() ->
|
||||
desc =>
|
||||
?T("This option defines after how many users in the room, "
|
||||
"it is considered overcrowded. When a MUC room is considered "
|
||||
"overcrowed, presence broadcasts are limited to reduce load, "
|
||||
"overcrowded, presence broadcasts are limited to reduce load, "
|
||||
"traffic and excessive presence \"storm\" received by participants. "
|
||||
"The default value is '1000'.")}},
|
||||
{min_message_interval,
|
||||
|
||||
+24
-27
@@ -505,12 +505,12 @@ normal_state({route, <<"">>,
|
||||
process_iq_adhoc(From, IQ, StateData);
|
||||
#register{} ->
|
||||
mod_muc:process_iq_register(IQ);
|
||||
#message_moderate{} = Moderate -> % moderate:1
|
||||
process_iq_moderate(From, IQ, Moderate, StateData);
|
||||
#message_moderate{id = Id, reason = Reason} -> % moderate:1
|
||||
process_iq_moderate(From, IQ, Id, Reason, StateData);
|
||||
#fasten_apply_to{id = ModerateId} = ApplyTo ->
|
||||
case xmpp:get_subtag(ApplyTo, #message_moderate{}) of
|
||||
#message_moderate{} = Moderate -> % moderate:0
|
||||
process_iq_moderate(From, IQ, Moderate#message_moderate{id = ModerateId}, StateData);
|
||||
case xmpp:get_subtag(ApplyTo, #message_moderate_21{}) of
|
||||
#message_moderate_21{reason = Reason} -> % moderate:0
|
||||
process_iq_moderate(From, IQ, ModerateId, Reason, StateData);
|
||||
_ ->
|
||||
Txt = ?T("The feature requested is not "
|
||||
"supported by the conference"),
|
||||
@@ -4576,8 +4576,14 @@ iq_disco_info_extras(Lang, StateData, Static) ->
|
||||
false ->
|
||||
Fs3
|
||||
end,
|
||||
Fs5 = case (StateData#state.config)#config.vcard_xupdate of
|
||||
Hash when is_binary(Hash) ->
|
||||
[{avatarhash, [Hash]} | Fs4];
|
||||
_ ->
|
||||
Fs4
|
||||
end,
|
||||
#xdata{type = result,
|
||||
fields = muc_roominfo:encode(Fs4, Lang)}.
|
||||
fields = muc_roominfo:encode(Fs5, Lang)}.
|
||||
|
||||
-spec process_iq_disco_items(jid(), iq(), state()) ->
|
||||
{error, stanza_error()} | {result, disco_items()}.
|
||||
@@ -5162,13 +5168,12 @@ add_presence_hats(JID, Pres, StateData) ->
|
||||
Pres
|
||||
end.
|
||||
|
||||
-spec process_iq_moderate(jid(), iq(), message_moderate(), state()) ->
|
||||
-spec process_iq_moderate(jid(), iq(), binary(), binary() | undefined, state()) ->
|
||||
{result, undefined, state()} |
|
||||
{error, stanza_error()}.
|
||||
process_iq_moderate(_From, #iq{type = get}, _Moderate, _StateData) ->
|
||||
process_iq_moderate(_From, #iq{type = get}, _Id, _Reason, _StateData) ->
|
||||
{error, xmpp:err_bad_request()};
|
||||
process_iq_moderate(From, #iq{type = set, lang = Lang},
|
||||
#message_moderate{id = Id, reason = Reason, xmlns = Xmlns},
|
||||
process_iq_moderate(From, #iq{type = set, lang = Lang}, Id, Reason,
|
||||
#state{config = Config, room = Room, host = Host,
|
||||
jid = JID, server_host = Server} = StateData) ->
|
||||
FAffiliation = get_affiliation(From, StateData),
|
||||
@@ -5189,25 +5194,17 @@ process_iq_moderate(From, #iq{type = set, lang = Lang},
|
||||
ok
|
||||
end,
|
||||
By = jid:replace_resource(JID, find_nick_by_jid(From, StateData)),
|
||||
SubEl = case Xmlns of
|
||||
?NS_MESSAGE_MODERATE_0 ->
|
||||
SubEls = [#xmlel{name = <<"reason">>,
|
||||
attrs = [],
|
||||
children = [{xmlcdata, Reason}]},
|
||||
#message_retract{id = Id}],
|
||||
ModeratedEl = #message_moderated{by = By,
|
||||
sub_els = SubEls},
|
||||
#fasten_apply_to{id = Id,
|
||||
sub_els = [ModeratedEl]};
|
||||
?NS_MESSAGE_MODERATE_1 ->
|
||||
ModeratedEl = #message_moderated{by = By},
|
||||
#message_retract{id = Id,
|
||||
reason = Reason,
|
||||
moderated = ModeratedEl}
|
||||
end,
|
||||
Mod21 = #message_moderated_21{by = By,
|
||||
reason = Reason,
|
||||
sub_els = [#message_retract_30{}]},
|
||||
SubEl = [#fasten_apply_to{id = Id,
|
||||
sub_els = [Mod21]},
|
||||
#message_retract{id = Id,
|
||||
reason = Reason,
|
||||
moderated = #message_moderated{by = By}}],
|
||||
Packet0 = #message{type = groupchat,
|
||||
from = From,
|
||||
sub_els = [SubEl]},
|
||||
sub_els = SubEl},
|
||||
{FromNick, _Role} = get_participant_data(From, StateData),
|
||||
Packet = ejabberd_hooks:run_fold(muc_filter_message,
|
||||
StateData#state.server_host,
|
||||
|
||||
+2
-2
@@ -1225,7 +1225,7 @@ mod_doc() ->
|
||||
{bounce_groupchat,
|
||||
#{value => "true | false",
|
||||
desc =>
|
||||
?T("This option is use the disable an optimisation that "
|
||||
?T("This option is use the disable an optimization that "
|
||||
"avoids bouncing error messages when groupchat messages "
|
||||
"could not be stored as offline. It will reduce chat "
|
||||
"room load, without any drawback in standard use cases. "
|
||||
@@ -1235,7 +1235,7 @@ mod_doc() ->
|
||||
"but the bounce is much more likely to happen in the context "
|
||||
"of MucSub, so it is even more important to have it on "
|
||||
"large MucSub services. The default value is 'false', meaning "
|
||||
"the optimisation is enabled.")}},
|
||||
"the optimization is enabled.")}},
|
||||
{db_type,
|
||||
#{value => "mnesia | sql",
|
||||
desc =>
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ mod_doc() ->
|
||||
"\"app servers\" operated by third-party vendors of "
|
||||
"mobile apps. Those app servers will usually trigger "
|
||||
"notification delivery to the user's mobile device using "
|
||||
"platform-dependant backend services such as FCM or APNS."),
|
||||
"platform-dependent backend services such as FCM or APNS."),
|
||||
opts =>
|
||||
[{notify_on,
|
||||
#{value => "messages | all",
|
||||
|
||||
+16
-1
@@ -412,6 +412,12 @@ send_welcome_message(JID) ->
|
||||
case mod_register_opt:welcome_message(Host) of
|
||||
{<<"">>, <<"">>} -> ok;
|
||||
{Subj, Body} ->
|
||||
ejabberd_router:route(
|
||||
#message{from = jid:make(Host),
|
||||
to = JID,
|
||||
type = chat,
|
||||
subject = xmpp:mk_text(Subj),
|
||||
body = xmpp:mk_text(<<Subj/binary, "\n\n", Body/binary>>)}),
|
||||
ejabberd_router:route(
|
||||
#message{from = jid:make(Host),
|
||||
to = JID,
|
||||
@@ -702,4 +708,13 @@ mod_doc() ->
|
||||
#{value => "{subject: Subject, body: Body}",
|
||||
desc =>
|
||||
?T("Set a welcome message that is sent to each newly registered account. "
|
||||
"The message will have subject 'Subject' and text 'Body'.")}}]}.
|
||||
"The message will have subject 'Subject' and text 'Body'."),
|
||||
example =>
|
||||
["modules:",
|
||||
" mod_register:",
|
||||
" welcome_message:",
|
||||
" subject: \"Welcome!\"",
|
||||
" body: |-",
|
||||
" Hi!",
|
||||
" Welcome to this XMPP server"]}}
|
||||
]}.
|
||||
|
||||
@@ -950,7 +950,7 @@ mod_doc() ->
|
||||
"https://xmpp.org/extensions/xep-0198.html"
|
||||
"[XEP-0198: Stream Management]. This protocol allows "
|
||||
"active management of an XML stream between two XMPP "
|
||||
"entities, including features for stanza acknowledgements "
|
||||
"entities, including features for stanza acknowledgments "
|
||||
"and stream resumption."),
|
||||
opts =>
|
||||
[{max_ack_queue,
|
||||
@@ -992,7 +992,7 @@ mod_doc() ->
|
||||
{ack_timeout,
|
||||
#{value => "timeout()",
|
||||
desc =>
|
||||
?T("A time to wait for stanza acknowledgements. "
|
||||
?T("A time to wait for stanza acknowledgments. "
|
||||
"Setting it to 'infinity' effectively disables the timeout. "
|
||||
"The default value is '1' minute.")}},
|
||||
{resend_on_timeout,
|
||||
|
||||
@@ -86,6 +86,7 @@ features() ->
|
||||
<<"delete-nodes">>,
|
||||
<<"delete-items">>,
|
||||
<<"filtered-notifications">>,
|
||||
<<"item-ids">>,
|
||||
<<"modify-affiliations">>,
|
||||
<<"multi-items">>,
|
||||
<<"outcast-affiliation">>,
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
%%% Author : Badlop <badlop@process-one.net>
|
||||
%%% Created : 2 Jul 2024 by Badlop <badlop@process-one.net>
|
||||
%%%
|
||||
%%%
|
||||
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
|
||||
%%%
|
||||
%%% This program is free software; you can redistribute it and/or
|
||||
%%% modify it under the terms of the GNU General Public License as
|
||||
%%% published by the Free Software Foundation; either version 2 of the
|
||||
%%% License, or (at your option) any later version.
|
||||
%%%
|
||||
%%% This program is distributed in the hope that it will be useful,
|
||||
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
%%% General Public License for more details.
|
||||
%%%
|
||||
%%% You should have received a copy of the GNU General Public License along
|
||||
%%% with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
%%%
|
||||
%%%-------------------------------------------------------------------
|
||||
|
||||
%%%% definitions
|
||||
|
||||
%% @format-begin
|
||||
|
||||
-module(commands_tests).
|
||||
|
||||
-compile(export_all).
|
||||
|
||||
-include("suite.hrl").
|
||||
|
||||
%%%==================================
|
||||
%%%% setup
|
||||
|
||||
single_cases() ->
|
||||
{commands_single,
|
||||
[sequence],
|
||||
[single_test(setup),
|
||||
single_test(ejabberdctl),
|
||||
single_test(http_integer),
|
||||
single_test(http_string),
|
||||
single_test(http_binary),
|
||||
single_test(http_atom),
|
||||
single_test(http_rescode),
|
||||
single_test(http_restuple),
|
||||
single_test(http_list),
|
||||
single_test(http_tuple),
|
||||
single_test(http_list_tuple),
|
||||
single_test(http_list_tuple_map)]}.
|
||||
|
||||
setup(_Config) ->
|
||||
M = <<"mod_example">>,
|
||||
execute(module_uninstall, [M]),
|
||||
case execute(module_install, [M]) of
|
||||
ok ->
|
||||
ok;
|
||||
{error, not_available} ->
|
||||
?match(ok, execute(modules_update_specs, [])),
|
||||
?match(ok, execute(module_install, [M]))
|
||||
end,
|
||||
Installed = execute(modules_installed, []),
|
||||
?match(true, lists:keymember(mod_example, 1, Installed)).
|
||||
|
||||
%%%==================================
|
||||
%%%% ejabberdctl
|
||||
|
||||
%% TODO: find a way to read and check the output printed in the command line
|
||||
ejabberdctl(_Config) ->
|
||||
R = ejabberd_ctl:process(["modules_installed"]),
|
||||
ct:pal("ejabberdctl: R ~p", [R]),
|
||||
ct:pal("ejabberdctl: Q ~p", [os:cmd("ejabberdctl modules_installed")]),
|
||||
Installed = execute(modules_installed, []),
|
||||
?match(true, lists:keymember(mod_example, 1, Installed)).
|
||||
|
||||
%%%==================================
|
||||
%%%% mod_http_api
|
||||
|
||||
http_integer(Config) ->
|
||||
Integer = 123456789,
|
||||
?match(Integer, query(Config, "command_test_integer", #{arg_integer => Integer})).
|
||||
|
||||
http_string(Config) ->
|
||||
S = "This is a string.",
|
||||
B = iolist_to_binary(S),
|
||||
?match(B, query(Config, "command_test_string", #{arg_string => S})),
|
||||
?match(B, query(Config, "command_test_string", #{arg_string => B})).
|
||||
|
||||
http_binary(Config) ->
|
||||
B = <<"This is a binary.">>,
|
||||
?match(B, query(Config, "command_test_binary", #{arg_binary => B})).
|
||||
|
||||
%% mod_http_api doesn't handle 'atom' result format
|
||||
%% and formats the result as a binary by default
|
||||
http_atom(Config) ->
|
||||
S = "Some string.",
|
||||
B = <<"Some string.">>,
|
||||
?match(B, query(Config, "command_test_atom", #{arg_string => S})),
|
||||
?match(B, query(Config, "command_test_atom", #{arg_string => B})).
|
||||
|
||||
http_rescode(Config) ->
|
||||
?match(0, query(Config, "command_test_rescode", #{code => "true"})),
|
||||
?match(0, query(Config, "command_test_rescode", #{code => "ok"})),
|
||||
?match(1, query(Config, "command_test_rescode", #{code => "problem"})),
|
||||
?match(1, query(Config, "command_test_rescode", #{code => "error"})).
|
||||
|
||||
http_restuple(Config) ->
|
||||
?match(<<"Deleted 0 users: []">>, query(Config, "delete_old_users", #{days => 99})),
|
||||
?match(<<"Good">>,
|
||||
query(Config, "command_test_restuple", #{code => "true", text => "Good"})),
|
||||
?match(<<"OK!!">>,
|
||||
query(Config, "command_test_restuple", #{code => "ok", text => "OK!!"})).
|
||||
|
||||
http_list(Config) ->
|
||||
ListS = ["one", "first", "primary"],
|
||||
ListB = [<<"one">>, <<"first">>, <<"primary">>],
|
||||
?match(ListB, query(Config, "command_test_list", #{arg_list => ListS})),
|
||||
?match(ListB, query(Config, "command_test_list", #{arg_list => ListB})).
|
||||
|
||||
http_tuple(Config) ->
|
||||
MapA =
|
||||
#{element1 => "one",
|
||||
element2 => "first",
|
||||
element3 => "primary"},
|
||||
MapB =
|
||||
#{<<"element1">> => <<"one">>,
|
||||
<<"element2">> => <<"first">>,
|
||||
<<"element3">> => <<"primary">>},
|
||||
?match(MapB, query(Config, "command_test_tuple", #{arg_tuple => MapA})),
|
||||
?match(MapB, query(Config, "command_test_tuple", #{arg_tuple => MapB})).
|
||||
|
||||
http_list_tuple(Config) ->
|
||||
LTA = [#{element1 => "one", element2 => "uno"},
|
||||
#{element1 => "dos", element2 => "two"},
|
||||
#{element1 => "three", element2 => "tres"}],
|
||||
LTB = [#{<<"element1">> => <<"one">>, <<"element2">> => <<"uno">>},
|
||||
#{<<"element1">> => <<"dos">>, <<"element2">> => <<"two">>},
|
||||
#{<<"element1">> => <<"three">>, <<"element2">> => <<"tres">>}],
|
||||
?match(LTB, query(Config, "command_test_list_tuple", #{arg_list => LTA})),
|
||||
?match(LTB, query(Config, "command_test_list_tuple", #{arg_list => LTB})).
|
||||
|
||||
http_list_tuple_map(Config) ->
|
||||
LTA = #{<<"one">> => <<"uno">>,
|
||||
<<"dos">> => <<"two">>,
|
||||
<<"three">> => <<"tres">>},
|
||||
LTB = lists:sort([#{<<"element1">> => <<"one">>, <<"element2">> => <<"uno">>},
|
||||
#{<<"element1">> => <<"dos">>, <<"element2">> => <<"two">>},
|
||||
#{<<"element1">> => <<"three">>, <<"element2">> => <<"tres">>}]),
|
||||
?match(LTB, lists:sort(query(Config, "command_test_list_tuple", #{arg_list => LTA}))).
|
||||
|
||||
%%%==================================
|
||||
%%%% internal functions
|
||||
|
||||
single_test(T) ->
|
||||
list_to_atom("commands_" ++ atom_to_list(T)).
|
||||
|
||||
execute(Name, Args) ->
|
||||
ejabberd_commands:execute_command2(Name, Args, #{caller_module => ejabberd_ctl}, 1000000).
|
||||
|
||||
page(Config, Tail) ->
|
||||
Server = ?config(server_host, Config),
|
||||
Port = ct:get_config(web_port, 5280),
|
||||
"http://" ++ Server ++ ":" ++ integer_to_list(Port) ++ "/api/" ++ Tail.
|
||||
|
||||
query(Config, Tail, Map) ->
|
||||
BodyQ = misc:json_encode(Map),
|
||||
Body = make_query(Config, Tail, BodyQ),
|
||||
misc:json_decode(Body).
|
||||
|
||||
make_query(Config, Tail, BodyQ) ->
|
||||
?match({ok, {{"HTTP/1.1", 200, _}, _, Body}},
|
||||
httpc:request(post,
|
||||
{page(Config, Tail), [], "application/json", BodyQ},
|
||||
[],
|
||||
[{body_format, binary}]),
|
||||
Body).
|
||||
|
||||
%%%==================================
|
||||
|
||||
%%% vim: set foldmethod=marker foldmarker=%%%%,%%%=:
|
||||
@@ -186,10 +186,12 @@ end_per_group(mssql, Config) ->
|
||||
end,
|
||||
ok;
|
||||
end_per_group(pgsql, Config) ->
|
||||
Query = "SELECT EXISTS (SELECT FROM information_schema.tables WHERE table_name = 'mqtt_pub');",
|
||||
Query = "SELECT EXISTS (SELECT 0 FROM information_schema.tables WHERE table_name = 'mqtt_pub');",
|
||||
case catch ejabberd_sql:sql_query(?PGSQL_VHOST, [Query]) of
|
||||
{selected, [t]} ->
|
||||
clear_sql_tables(pgsql, Config);
|
||||
{selected, _, [[<<"t">>]]} ->
|
||||
clear_sql_tables(pgsql, Config);
|
||||
Other ->
|
||||
ct:fail({failed_to_check_table_existence, pgsql, Other})
|
||||
end,
|
||||
@@ -388,6 +390,7 @@ no_db_tests() ->
|
||||
auth_external_wrong_jid,
|
||||
auth_external_wrong_server,
|
||||
auth_external_invalid_cert,
|
||||
commands_tests:single_cases(),
|
||||
jidprep_tests:single_cases(),
|
||||
sm_tests:single_cases(),
|
||||
sm_tests:master_slave_cases(),
|
||||
@@ -917,6 +920,8 @@ presence_broadcast(Config) ->
|
||||
IQ = #iq{type = get,
|
||||
from = JID,
|
||||
sub_els = [#disco_info{node = Node}]} = recv_iq(Config),
|
||||
#message{type = chat,
|
||||
subject = [#text{lang = <<"en">>,data = <<"Welcome!">>}]} = recv_message(Config),
|
||||
#message{type = normal,
|
||||
subject = [#text{lang = <<"en">>,data = <<"Welcome!">>}]} = recv_message(Config),
|
||||
#presence{from = JID, to = JID} = recv_presence(Config),
|
||||
|
||||
@@ -247,7 +247,6 @@ create_setup_script()
|
||||
if [ "\$code_dir" != '$default_code_dir' ]
|
||||
then
|
||||
sed -i "s|$default_code_dir|\$code_dir|g" \
|
||||
"\$code_dir/bin/${rel_name}ctl" \
|
||||
"\$code_dir/bin/$rel_name.init" \
|
||||
"\$code_dir/bin/$rel_name.service"
|
||||
fi
|
||||
@@ -255,8 +254,6 @@ create_setup_script()
|
||||
then
|
||||
sed -i "s|$default_data_dir|\$data_dir|g" \
|
||||
"\$code_dir/bin/${rel_name}ctl" \
|
||||
"\$code_dir/bin/$rel_name.init" \
|
||||
"\$code_dir/bin/$rel_name.service" \
|
||||
"\$data_dir/conf/$rel_name.yml" \
|
||||
"\$data_dir/conf/${rel_name}ctl.cfg"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user