Paweł Chmielowski
426fd14b11
Make sure that policy=user commands have host instead of server arg in docs
...
We renamed them in ejabberd_command, but forgot to update doc geenerator.
2023-09-20 14:06:23 +02:00
Holger Weiss
6c573cc9fd
mod_push: Set 'last-message-sender' to bare JID
...
If the mod_push option 'include_sender' is set to 'true', use the bare
JID rather than the full JID for the 'last-message-sender' field.
2023-09-09 17:33:16 +02:00
Holger Weiss
2782430887
mod_push: Add 'notify_on' option
...
If the new 'notify_on' option is set to 'messages', notifications are
only triggered by actual chat messages with a body (or encrypted
payload). The default behavior remains to generate a notification on
any kind of stanzas.
Thanks to EISST International Ltd for sponsoring this work.
2023-09-08 19:49:17 +02:00
Badlop
706424f0d2
Fix crash when loading room from DB older than ffa07c6
, 23.04
...
Before commit ffa07c6
, the subject_author was just the author nick,
since that commit, subject_author contains {author nick, JID}.
2023-09-04 11:32:28 +02:00
Badlop
a01de8d944
Fix small bug introduced in 5d549dc
...
When providing a client-id as explained in
https://www.process-one.net/blog/understanding-ejabberd-oauth-support-roadmap/
ejabberd crashed with an error
exception error: no function clause matching
ejabberd_oauth:get_client_identity(
as reported in
https://stackoverflow.com/questions/76922951/ejabberd-oauth-api-http-1-1-502-bad-gateway
2023-08-28 18:26:03 +02:00
Paweł Chmielowski
c0e7774937
Don't always store messages passed through muc_filter_message
...
Recently we added new places where we call muc_filter_message to add
occupandid info to messages, but this also made them be stored in archive
as mod_mam uses that hook for getting sent messages - in case of those
messages we shouldn't be doing this.
This should fix issue #4083
2023-08-25 14:20:51 +02:00
Paweł Chmielowski
00c76003cb
Add ability to force alternative upsert implementation in mysql
2023-08-18 11:46:37 +02:00
Badlop
b29f87a978
Result of running: make doap options
2023-08-16 13:14:02 +02:00
Holger Weiss
2dc843cddd
mod_privilege: Don't fail to edit roster ( #3942 )
2023-08-16 13:08:21 +02:00
Badlop
a84fbd6a74
Improve syntax of many command descriptions for the Docs site
2023-08-16 12:27:23 +02:00
Badlop
f8af3a0005
create_room_with_opts: fix typo and move examples to args_example ( #4080 )
2023-08-16 12:27:23 +02:00
Badlop
83e51c815d
Pass also MUC room retract messages over the muc_filter_message ( #3397 )
2023-08-16 12:27:23 +02:00
Badlop
ff24700156
Fix support to retract a MUC room message
...
Now this works as expected
https://xmpp.org/extensions/xep-0425.html#example-4
2023-08-16 12:27:22 +02:00
Badlop
7683691f5a
mod_muc_occupantid: New mnesia table to store rooms salts ( #3397 )
2023-08-16 12:27:22 +02:00
Badlop
3479f88dab
Pass MUC room private messages over the muc_filter_message too ( #3397 )
2023-08-16 12:27:22 +02:00
Badlop
86fc2f157e
Always add the occupant id, even in non-anonymous rooms ( #3397 )
2023-08-16 12:27:22 +02:00
Badlop
ffa07c649b
Store the subject author JID, and run muc_filter_message when sending subject ( #3397 )
...
When changing the room subject, store the original author JID,
so later it can be provided in the hook and mod_room_occupantid
can use it to calculate and provide the occupant id
This is noticeable when a new occupant joins an existing room,
and receives the room subject.
2023-08-16 12:27:22 +02:00
Badlop
2bd61abd71
Convert allow_private_message MUC room option to allowpm ( #3736 )
2023-08-16 12:25:46 +02:00
Badlop
66df953da1
Fix usage of plugins option, which produced default_node_config ignore ( #4070 )
2023-08-16 12:25:42 +02:00
Badlop
550a586d2a
New listener option unix_socket, useful when setting unix socket files ( #4059 )
...
listen:
-
port: "unix://tmp/asd/socket"
unix_socket:
mode: '0775'
owner: 117
group: 135
2023-08-16 12:25:36 +02:00
Badlop
16473ab691
When sending message on behalf of user, trigger user_send_packet ( #3990 )
...
This way, MAM and CarbonCopy get triggered.
This is useful for transports like Slidge.
2023-08-16 12:25:29 +02:00
Paweł Chmielowski
c5afd0322e
Properly parse mysql version even if it doesn't have type tag
2023-08-14 17:12:16 +02:00
Alexey Shchepin
eeacace02a
Update some modules to the new gen_mod API
2023-08-09 17:08:45 +03:00
Holger Weiss
caf3807bcc
ejabberd_systemd: Add a few debug messages
2023-08-09 01:58:48 +02:00
Holger Weiss
6c7e85d3d8
ejabberd_systemd: Avoid using gen_server timeout
...
Don't (ab)use the gen_server timeout mechanism for pinging the systemd
watchdog. Under certain conditions (e.g., the process receiving sys
messages), the gen_server timeout might not be triggered as expected.
Fixes #4054 , fixes #4058 ,
2023-08-09 01:54:12 +02:00
Holger Weiss
f0db7623d1
mod_push_keepalive: Don't let hook crash
...
Check whether mod_push_keepalive is loaded for a given host before
querying the module configuration for that host. This avoids a hook
crash in the case where the module is enabled for some but not all
hosts.
2023-08-09 00:11:43 +02:00
Holger Weiss
26ed6539ba
mod_push_keepalive: Delay 'wake_on_start'
...
Delay the 'wake_on_start' notifications until ejabberd is fully
initialized. This makes sure no s2s connections are initiated before
certificates are loaded.
Many thanks to Friedrich Altheide for reporting the issue.
2023-08-08 20:17:10 +02:00
Alexey Shchepin
a9347cd248
Fix unused variable warnings in mod_stats
2023-08-04 20:54:02 +03:00
Alexey Shchepin
60002fc145
Update some modules to the new gen_mod API
2023-08-04 18:53:50 +03:00
Paweł Chmielowski
20a8654be2
Reset scram fields when setting plain password in ejabberd_auth_sql
...
Setting scram password, then disabling scram and setting plain password
again, will make us think we are still using scramed password and crash
when trying to process it as such. This makes sure that when set plain
password we don't leave parts from old scram password.
2023-08-03 13:07:13 +02:00
Badlop
25411333da
Add support for XEP-0421 Occupant Id in anonymous MUC rooms ( #3397 )
2023-08-02 17:54:54 +02:00
Alexey Shchepin
4bd77797fc
Add shorter forms for gen_mod hook/iq_handler API
2023-08-01 18:14:08 +03:00
Alexey Shchepin
03ffbe00c1
Update mod_disco to the new gen_mod API
2023-07-31 16:52:00 +03:00
Alexey Shchepin
5a9099f49c
Extend gen_mod API to simplify hooks and IQ handlers registration
2023-07-31 16:52:00 +03:00
Paweł Chmielowski
3710dc1e3b
Use prepared statement with mysql
2023-07-25 18:11:24 +02:00
Badlop
db03c7428c
Web Admin roster page: move the AddJID textbox to top ( #4067 )
2023-07-24 20:27:01 +02:00
Badlop
78f81de252
Improve support to stop external modules written in Elixir
2023-07-13 13:41:18 +02:00
Paweł Chmielowski
fafb48e88f
Merge pull request #4025 from jpds/increase-default-backlog
...
ejabberd_listener.erl: Increase default listen queue backlog value
2023-07-11 12:19:33 +02:00
Paweł Chmielowski
54314e5bb9
Better error handling in mod_muc_rtbl
...
Should fix issue #4050
2023-07-04 18:18:49 +02:00
Badlop
dcc8149f58
New command to halt ejabberd abruptly with an error status code
...
Used for processone/ejabberd-contrib#97
2023-06-20 17:54:10 +02:00
Badlop
d2c54fd5fe
Fix calling ejabberdctl command with wrong number of arguments with Erlang 26
...
In Erlang up to 25.3, the lists:zip arguments were [A1, A2]
Since Erlang 26.0, the arguments are: [A1, A2, fail]
93748a8d84
2023-06-13 12:25:27 +02:00
Badlop
f40a7b1c77
OAuth: Handle badpass error message
2023-06-13 12:25:22 +02:00
Badlop
c333cc0776
New option install_contrib_modules
...
This option is read during ejabberd start or config reload.
It installs the listed modules which aren't yet installed,
as long as allow_contrib_modules is not disabled.
Edit ejabberd.yml and configure the desired ejabberd-contrib modules,
add them in the install_contrib_modules option,
finally start ejabberd (or reload config).
2023-06-09 10:27:13 +02:00
Badlop
0bbc255814
Dialyzer dirty workarounds because re:mp() is not an exported type
...
Since Erlang/OTP 26, Dialyzer by default reports unknown types.
ejabberd's type specs refer to the re:mp() type,
but that isn't exported in the OTP source code,
and cannot be used in any other modules.
This commit provides very dirty workarounds, and any cleaner
alternative is very welcomed.
2023-06-09 00:02:15 +02:00
Badlop
436074c67a
When installing module already configured, keep config as example
...
When installing a module using ext_mod, if it has already configuration
in the modules section, copy its specific config file as an example
(copy file and rename it).
This may happen when using the new install_contrib_modules option.
2023-06-09 00:02:02 +02:00
Paweł Chmielowski
bb8e892323
Add alternate version of mysql upsert
...
This one works by issuing select and then insert or update or skip depending
on what select returns. We use this on mysql 5.7.26 and 8.0.20 where
previous implementation using 'replace' or 'on conflict update' can cause
excessive deadlocks.
2023-06-07 16:38:07 +02:00
Paweł Chmielowski
3eecf4ae8a
Remove existing role information for users that are kicked from room
...
This should fix issue reported in #4035
2023-05-24 12:15:20 +02:00
Paweł Chmielowski
4a53d4cb56
Expand rule "mucsub subscribers are members in members only rooms" to more places
2023-05-24 11:26:48 +02:00
Paweł Chmielowski
1818a29c29
Don't crash in mod_shared_roster_ldap:get_member_jid on empty output
...
This based on crash from issue #3614
2023-05-22 12:48:29 +02:00
Paweł Chmielowski
dd2efc360b
Fix return values from calculate_diff inside mod_privacy_sql
2023-05-02 15:59:40 +02:00
Paweł Chmielowski
8e64992f47
Use more efficient way to calculate changes in set_privacy_list
2023-05-02 11:43:29 +02:00
Jonathan Davies
040c72f1c8
ejabberd_listener.erl: Increase default listen queue backlog value to 128, which
...
is the default value on both Linux and FreeBSD.
2023-04-25 20:11:04 +01:00
Badlop
c6b295b5a0
Fix typo in the previous commit
2023-04-25 09:48:02 +02:00
Badlop
2a4a6bec18
Add trailing backslash to URLs shown in mod_muc_log disco#info
2023-04-24 13:43:09 +02:00
Badlop
0d3f8c7b9f
Make mod_register_web redirect to page that end with / ( #3177 )
...
Code copied from ejabberd_web_admin.erl, commit 5ec21438
2023-04-24 13:43:07 +02:00
Paweł Chmielowski
5b8ebed81b
Optimize mod_privacy_sql:set_list
...
Previously we always did delete everything and set all entries back, now
we check if we need to delete anything and if not insert only missing data.
2023-04-20 10:55:30 +02:00
Badlop
d717ffd1a0
Update version notes of options and commands
2023-04-18 10:37:14 +02:00
Badlop
5b695766ae
Mention what ejabberd version first supports rtbl
2023-04-18 10:37:04 +02:00
Paweł Chmielowski
f5b6909cca
Unregister hooks on stop in mod_muc_rbtl
2023-04-17 18:03:21 +02:00
Paweł Chmielowski
98d348893b
Make mod_muc_rtbl notify only local node rooms
2023-04-17 17:07:59 +02:00
Paweł Chmielowski
c942c31e38
Add mod_muc_rtbl
...
This implements Real-time blocklists for XMPP (xmppbl.org).
Closes #4017
2023-04-17 16:59:42 +02:00
Paweł Chmielowski
70cbdd1117
Allow to update state from muc_process_iq hook
2023-04-17 16:57:54 +02:00
Paweł Chmielowski
1114a35e0a
Recognize message retractions in mod_muc
2023-04-14 12:32:35 +02:00
Paweł Chmielowski
d12e5a44b8
Add by attribute to generated muc moderation messages
2023-04-14 12:31:34 +02:00
Badlop
99e51a2123
Mention in mod_mam.erl its support for XEP-0425: Message Moderation
...
Then run "make doap" to regenerate ejabberd.doap
2023-03-30 17:02:54 +02:00
Paweł Chmielowski
f6385fae50
Fix dialyzer warning
2023-03-30 14:53:51 +02:00
Paweł Chmielowski
6da1bb5b22
Add support for "xep-0424 Message Moderation"
...
This fixes issue #3730
2023-03-30 14:38:08 +02:00
Badlop
1d62dc4621
Set roster name from XEP-0172, or the stored one ( #1611 )
2023-03-28 11:41:27 +02:00
Badlop
e2496562f9
Preliminary support to store extra elements in subscription request ( #840 )
2023-03-28 11:41:24 +02:00
Badlop
c4a2f8d64f
captcha_url option now accepts 'auto' value, and it's the default
2023-03-22 16:23:41 +01:00
Badlop
6c620f6f43
Remove wrong get_room_history command fields specification
2023-03-22 16:23:37 +01:00
Paweł Chmielowski
3c97775573
Pubsub xdata fields max_item/item_expira/children_max use 'max' not 'infinity'
...
Codec in xmpp crashes when we use infinity (see issue #4011 ), so lets
convert those values before passing them to xmpp:encode(0
2023-03-21 15:30:44 +01:00
Blake Miller
f953dc3f5e
Persist none
role for outcasts
...
`none` roles *should* be persisted for banned users. I totally forgot about this, my bad. I'm shocked nobody else noticed it.
2023-03-20 17:07:10 +01:00
Paweł Chmielowski
9503beca6c
Make mod_muc_room:set_opts process persistent flag first
...
As processing some other options depends on this setting flag in room
state.
2023-02-20 13:42:52 +01:00
Paweł Chmielowski
dfe4884d16
Allow passing affiliations and subscribers to create_room_with_opts command
2023-02-20 13:03:46 +01:00
Paweł Chmielowski
f10f6d176f
Store state in db in mod_muc:create_room()
2023-02-20 12:56:41 +01:00
Paweł Chmielowski
4e7aa41e3f
Make subscribers members by default
2023-02-20 12:55:31 +01:00
Paweł Chmielowski
d91812730b
Stop ejabberd_system_monitor before stopping node
...
Sometimes monitor module is performing checks when node is stopping and
this causes crash in monitoring process.
2023-02-08 19:53:19 +01:00
Paweł Chmielowski
54cf37e917
Invalidate vcard_xupdate cache on all nodes when vcard is updated
2023-02-08 19:06:44 +01:00
Paweł Chmielowski
3de803be2f
Add get_room_history command in mod_muc_admin
2023-02-08 11:04:26 +01:00
Paweł Chmielowski
5ca59807d9
Fix problem with results of mam queries using rsm with max and before
...
Plus add test case for it.
2023-02-03 11:37:54 +01:00
Paweł Chmielowski
5c3b43cd63
Update spec
2023-02-01 17:32:22 +01:00
Paweł Chmielowski
1a6baf223c
Re-allow anonymous connection for connection without client certificates
...
This fixes issue #3985 . Initial issue was introduced in
5506b838c8
adding tls client cert
authentication.
2023-02-01 16:58:25 +01:00
Paweł Chmielowski
74c9aa8ac0
Merge pull request #3982 from nosnilmot/sql-update-tests
...
SQL schema migration fixes and testing
2023-02-01 12:03:48 +01:00
Badlop
fb16727180
Ammend previous commit with another fix
2023-01-27 15:40:34 +01:00
Badlop
9842b035e3
Fix compilation problem with Erlang/OTP older than 21 introduced recently
...
Those macros were first introduced in c88a2d0
2023-01-27 15:29:41 +01:00
Alexey Shchepin
f6b5a52104
Add s2s_out_bounce_packet hook
2023-01-27 03:54:31 +03:00
Alexey Shchepin
f650b1e83c
Log HTTP handler exceptions
2023-01-27 03:54:31 +03:00
Badlop
c5c7e7fc4d
ext_mod: Improve support for loading *.so files from ext_mod dependencies
...
Copying files from deps/*/priv/*.so to the ejabberd priv/
is not possible when running ejabberd as OTP release or in a container.
Instead, let's copy the deps/*/priv/*.so maintaining the file structure,
and then using code:add_pathz for those dirs.
This partially reverts 5c1b72853f
2023-01-25 17:58:12 +01:00
Stu Tomlinson
0c1cf43519
Fix a long standing bug in new schema migration
...
... and make the test that uncovered it explicitly fail (there was already a
TODO) instead of passing but with errors logged
2023-01-21 15:42:43 +00:00
Stu Tomlinson
56e974ab80
Add ability to run tests on upgraded DB
...
To test update_sql operation and functionality of resulting DB:
1. Load original schema to DB
2. Set {update_sql, true} in suite.erl
3. Run tests
2023-01-21 15:42:43 +00:00
Stu Tomlinson
9398052b65
New schema migration 'update_sql' improvements
...
- check that server_host column does not already exist before addding it
and making other changes to table (update_sql becomes idempotent,
yay!)
- check that indexes exist before dropping them (some are historical and
are not created in more recent deployments), elminating spurious
errors from logs
- update new_sql_schema config after migration, to allow near
zero-downtime migrations (and help with automated testing)
2023-01-21 14:54:36 +00:00
Stu Tomlinson
6a8899677d
Un-deprecate ejabberd_config:set_option/2
...
There does not appear to be an alternative way to set individual config
options, and this is already used by test/ejabberd_SUITE.erl
2023-01-21 14:54:36 +00:00
Paweł Chmielowski
3b34538038
Remove debug line from last commit
2023-01-20 17:12:50 +01:00
Paweł Chmielowski
6cf1e05993
Try to populate room history from mam when unhibernating
2023-01-20 16:27:08 +01:00
Stu Tomlinson
c7c982b67b
Add MS SQL support for new schema migration
2023-01-19 23:36:42 +00:00
Stu Tomlinson
f7f0d3b1fb
Enable MySQL support for new schema migration
2023-01-19 23:36:42 +00:00
Stu Tomlinson
6fc67d83f4
Minor MS SQL improvements
...
Support 'sql_ssl' option for MS SQL - set Encryption=required and
Encrypt=yes in ODBC connection string to require SSL using default
FreeTDS driver and Microsoft ODBC Driver for SQL Server repectively.
Allow setting full ODBC connection string in 'sql_server' for MS SQL,
allowing custom connection configuration beyond what is possible with
just 'sql_odbc_driver' option.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
06ffe995e1
Remove unnecessary indexes
...
For columns are already included in a compound index there is no
benefit to having a separate index with a subset of the same columns in
the same order, it just wastes space.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
93bf4d5411
New SQL schema migrate fix
...
'server_host' column on 'route' table already exists in old schema and
does not need adding for new schema migration.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
19f2f1fa86
Fix MS SQL error caused by ORDER BY in subquery
...
'The ORDER BY clause is invalid in views, inline functions, derived
tables, subqueries, and common table expressions, unless TOP, OFFSET
or FOR XML is also specified.'
Omit the ORDER BY clause from subquery if the SELECT is not constrained
by TOP.
2023-01-19 23:36:42 +00:00
Paweł Chmielowski
758c87f564
Revert notes placement when generating markdown api commands documentation
2023-01-19 13:24:51 +01:00
Paweł Chmielowski
b6dde41000
Improve output in gen_html_doc_for_commands command
2023-01-19 11:45:33 +01:00
Stu Tomlinson
648c83ea03
Fix ejabberdctl output formatting ( #3979 )
...
ECMA-48 SGR sequence ESC [21m is actually 'set double underline' but was
incorrectly implemented as 'set normal intensity' in Linux prior to
4.17.
The correct sequence for 'set normal intensity' is ESC [22m, which fixes
output formatting of 'ejabberdctl' and 'ejabberdctl help' on macos.
2023-01-19 11:18:59 +01:00
Badlop
24839ad4be
Fix typos in documentation and changelog
2023-01-16 18:34:09 +01:00
Paweł Chmielowski
4566c82a85
Update man file
2023-01-16 16:24:44 +01:00
Paweł Chmielowski
024f3be13a
Update mod_mqtt_bridge documentation
2023-01-16 15:33:37 +01:00
Badlop
a70381e7c1
Annotate options that change in ejabberd 23.01
2023-01-16 15:10:29 +01:00
Badlop
276c11b04a
Fix doc of log_modules_fully allowed value
2023-01-16 15:10:24 +01:00
Badlop
0255562d93
Fix doc of outgoing_s2s_families default value, it changed in 25ddd7b
2023-01-16 15:10:22 +01:00
Paweł Chmielowski
26a7107cd5
Fix dialyzer warning
2023-01-16 12:14:21 +01:00
Paweł Chmielowski
89918865b0
Implement reload in mqtt_bridge
2023-01-16 11:22:17 +01:00
Paweł Chmielowski
f2cbe7f3c2
Recognize ws5/wss5 urls in mqtt_bridge
2023-01-16 11:01:24 +01:00
Paweł Chmielowski
83418c3195
Fix warning in mqtt_bridge
2023-01-16 11:01:04 +01:00
Paweł Chmielowski
5592f8df1a
Make dialyzer happy
2023-01-13 20:34:49 +01:00
Paweł Chmielowski
4311a5646f
Add support for websockets to mqtt bridge
2023-01-13 20:09:10 +01:00
Badlop
243697e25a
Update copyright year to 2023 ( #3967 )
2023-01-10 13:52:04 +01:00
Jérôme Sautret
0b1800fc10
Add hooks for mqtt subscribe & unsubscribe events
2023-01-05 14:58:18 +01:00
Badlop
92d7be4338
Use alternative split/2 function that works with Erlang/OTP as old as 19.3
2023-01-03 20:32:52 +01:00
Badlop
ce89ff07e7
Fix "make hooks"
2023-01-03 19:13:43 +01:00
Badlop
5c1b72853f
External modules: compile C files and install them in ejabberd's priv
2023-01-03 18:48:44 +01:00
Badlop
5d38143c3f
Initialize captcha system after loading modules and external modules
...
Since recently, ejabberd_captcha instead of a script may use a module,
for example the external module mod_ecaptcha, which must be loaded first.
2023-01-03 18:48:42 +01:00
Badlop
353c68cfa6
Add support to define module instead of path to script
2023-01-03 18:48:40 +01:00
Badlop
9087e72f0e
Update image key, some scripts generate their own random key
2023-01-03 18:48:38 +01:00
Badlop
4ad4a3bf24
Support to get module status from Elixir modules
2022-12-22 14:00:38 +01:00
Jonathan Davies
ed84fee2bf
ejabberd_options_doc.erl: Added outgoing_s2s_families deprecation
...
notice.
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2022-12-22 14:00:22 +01:00
Jonathan Davies
25ddd7b152
Changed default outgoing_s2s_families to IPv6 as servers are within datacenters
...
where IPv6 is more commonly enabled (contrary to clients), and if it's not
present - it'll just fall back to IPv4.
2022-12-22 14:00:22 +01:00
Paweł Chmielowski
5ad709a2e2
Fix typo in last commit
2022-12-21 11:13:49 +01:00
Paweł Chmielowski
32ace140df
Don't store mucsub presence events in offline storage
...
This is expanded version of pull request #3959
2022-12-21 11:12:08 +01:00
Paweł Chmielowski
bc063b8f97
Fix crash when api_permisions don't have who: section
...
Default value of that field was wrong, so lets correct this.
This fixes issue #3957
2022-12-15 11:27:20 +01:00
Badlop
03681cd68d
Expose the pubsub#type field in disco#info query to the node ( #3914 )
2022-12-13 23:57:34 +01:00
Badlop
6a10048339
Document the new log_modules_fully option
2022-12-13 23:24:01 +01:00
Paweł Chmielowski
25d6b3d1c8
Fix dialyzer warnings
2022-12-07 14:08:23 +01:00
Paweł Chmielowski
639183a783
Add support for certificate authentication in mqtt bridge
2022-12-07 13:38:05 +01:00
Paweł Chmielowski
80477f71b3
Add misc:uri_parse/2 to allow declaring default ports for protocols
2022-12-07 13:34:29 +01:00
Paweł Chmielowski
d49b50a055
Add log_modules_fully option to make some modules log everything independed from global loglevel
2022-12-01 13:24:46 +01:00
Paweł Chmielowski
54592202ef
Allow admin command to subscribe new users to members_only rooms
2022-12-01 11:52:39 +01:00
Paweł Chmielowski
be60263d47
Fix dialyzer warnings in mod_mqtt_bridge
2022-11-24 16:23:37 +01:00
Badlop
441eca75b2
hibernation_time is not an option worth storing in room state ( #3946 )
2022-11-23 18:40:28 +01:00
Badlop
266dd98521
OAuth: Accept jid as a HTTP URL query argument
2022-11-23 18:40:26 +01:00
Badlop
b0e74464b1
OAuth: Handle when client is not identified
2022-11-23 18:40:23 +01:00
Badlop
daaaf221cb
Don't set i18n option because Converse enforces it instead of browser lang ( #3951 )
2022-11-23 18:39:49 +01:00
Paweł Chmielowski
e2779e1155
Try to redirect access to files mod_conversejs to cdn when there is no local copies
2022-11-23 16:28:42 +01:00
Paweł Chmielowski
514bab47a2
Add hook for mqtt publish event
2022-11-23 15:16:43 +01:00
Paweł Chmielowski
fbea49dbab
Add mqtt bridge module
2022-11-23 14:50:18 +01:00
chengshq
5cf9b052dd
Jid format when multicastc
was cached ( #3950 )
...
The error log:
```2022-11-22 04:10:25.436648+00:00 [error] <0.515.0>@ejabberd_router:route/1:95 Failed to route packet:
#message{
id = <<>>,type = normal,lang = <<>>,
from =
#jid{
user = <<"a123">>,server = <<"conference.example.com">>,
resource = <<>>,luser = <<"a123">>,
lserver = <<"conference.example.com">>,lresource = <<>>},
to = <<"multicast.app.example.com">>,subject = [],body = [],
thread = undefined,
sub_els =
[#ps_event{
items =
#ps_items{
xmlns = <<>>,
node = <<"urn:xmpp:mucsub:nodes:subscribers">>,
items =
[#ps_item{
xmlns = <<>>,id = <<"5803948964051348597">>,
sub_els =
[#muc_subscribe{
nick = <<"bb">>,password = <<>>,
jid = undefined,events = []}],
node = <<>>,publisher = <<>>}],
max_items = undefined,subid = <<>>,retract = undefined},
purge = undefined,subscription = undefined,delete = undefined,
create = undefined,configuration = undefined},
#addresses{
list =
[#address{
type = bcc,
jid =
#jid{
user = <<"aaa">>,server = <<"app.example.com">>,
resource = <<>>,luser = <<"aaa">>,
lserver = <<"app.example.com">>,lresource = <<>>},
desc = <<>>,node = <<>>,delivered = undefined,
sub_els = []},
#address{
type = bcc,
jid =
#jid{
user = <<"bb">>,server = <<"app.example.com">>,
resource = <<>>,luser = <<"bb">>,
lserver = <<"app.example.com">>,lresource = <<>>},
desc = <<>>,node = <<>>,delivered = undefined,
sub_els = []}]}],
meta = #{}}
** exception error: {badrecord,jid}
in function ejabberd_router:do_route/1 (src/ejabberd_router.erl, line 394)
in call from ejabberd_router:route/1 (src/ejabberd_router.erl, line 92)
in call from maps:fold_1/3 (maps.erl, line 232)
in call from mod_multicast:handle_info/2 (src/mod_multicast.erl, line 206)
in call from gen_server:try_dispatch/4 (gen_server.erl, line 637)
in call from gen_server:handle_msg/6 (gen_server.erl, line 711)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 249)```
Then command debug select the multicastc:
```
(ejabberd@localhost)2> mnesia:dirty_read(multicastc, <<"app.example.com">>).
[{multicastc,<<"app.example.com">>,
{{multicast_supported,<<"multicast.app.example.com">>,
{limits,{default,20},{default,20}}},
cached},
63836303692}]```
The type of `Service` was binary.
2022-11-22 12:11:31 +01:00
Stu Tomlinson
a1cfae8c98
pgsql: do not set standard_conforming_strings to 'off' ( #3944 )
...
Since f9120f75b0
string literals use escape string syntax (E'...') on
pgsql, so it is no longer necessary to set standard_conforming_strings
to 'off'
Fixes #3932
2022-11-16 13:58:30 +01:00
Badlop
c6513fcfc6
Handle mnesia_system_event mnesia_up when other node joins this ( #3842 )
2022-11-14 18:45:20 +01:00
Paweł Chmielowski
6fcfe80a65
Pass ssl options to mysql driver
2022-11-14 11:19:51 +01:00
Paweł Chmielowski
992d998695
Silent warning in OTP24 about not specified cacerts in sql connections
2022-11-14 11:18:26 +01:00
Badlop
b71a481e63
Add details about XEP implementations to some protocol attributes
2022-11-07 18:56:46 +01:00
Badlop
b73a9234d9
Add some missing RFCs and remove problematic leading 0 in xep versions
2022-11-04 16:17:39 +01:00
Badlop
2ef71a6684
Annotate captcha_cmd option, run make options, update man
2022-10-25 12:11:24 +02:00
Badlop
8ea7690fc5
Support @VERSION@ and @SEMVER@ in captcha_cmd option
2022-10-24 12:35:30 +02:00
Holger Weiß
13d4787ea9
Bump default 's2s_timeout' value ( #3653 )
...
Wait for an hour before closing an idle s2s connection.
It's not uncommon for a connection to be idle for longer than ten
minutes but less than an hour. For example, XEP-0410 suggests a ping
interval of fifteen minutes. A longer idle timeout avoids the latency
and log entries associated with constantly re-establishing such
connections.
Co-authored-by: Paweł Chmielowski <pawel@process-one.net>
2022-10-18 16:08:16 +02:00
Frank
28b3134098
fix table creation on a running cluster ( #3913 )
2022-10-18 15:38:55 +02:00
Badlop
d29fdc4d2e
Remove unnecessary text string
2022-10-12 12:06:28 +02:00
Badlop
77f9254f45
Handle case that module exports mod_doc, but nothing in it
2022-10-12 12:06:11 +02:00
Badlop
77dacf92d2
Annotate new options
2022-10-12 12:06:09 +02:00
Paweł Chmielowski
c99ff6059f
Fix cache invalidation in shared roster
...
Doing srg_get_info for not existing group, then srg_create, will make
srg_add_user fail because it will get info that group doesn't exist from
cache.
2022-09-28 18:28:24 +02:00
Paweł Chmielowski
4a22604701
Export mod_muc_admin:get_room_pid/2
2022-09-22 11:11:02 +02:00
Badlop
796f567db1
The archive_msg export fun requires MUC Service for room archives
2022-09-16 16:35:00 +02:00
Badlop
2229e4c6db
Allow MUC service admins to bypass max_user_conferences limitation
2022-09-16 16:34:58 +02:00
Badlop
fac74f623e
Remove unused macro definitions detected by rebar3_hank
...
?OFFLINE_TABLE_LOCK_THRESHOLD is unused:
definition and usage added in 4103f30812
definition copied, and usage moved to mod_offline_mnesia, in 901d2e0aed
definition and usage removed in mod_offline_mnesia in d88e4d495f
this definition looks useless
?VERSION_MULTICAST is unused:
added in 0cf8d1fa6e
it was never used
?DISCO_QUERY_TIMEOUT is unused:
added in 0cf8d1fa6e
it was never used
?FEATURE/1 is unused:
added in 0cf8d1fa6e
usage removed in bc33a3873d
?DEFAULT_MAX_USERS_PRESENCE is unused:
added in f817762cc4
usage removed in ba2b650464
?CT_XML is unused:
added in 46568fb959
removed in 3dc55c6d47
2022-09-16 16:34:56 +02:00
Linus Jahn
14882342be
Adapt to change of mix_annotate type to boolean in roster_query
2022-09-16 12:29:51 +02:00
Linus Jahn
eeed1ca87f
Adapt to renaming of 'participant-id' from mix_roster_channel record
2022-09-16 12:29:50 +02:00
Badlop
a8121cd7e5
Don't persist 'none' role (thanks to Blake Miller)( #3330 )
2022-09-13 17:55:09 +02:00
Badlop
4d3875f4ff
Store role, and use it when joining a moderated room ( #3330 )
2022-09-13 17:55:03 +02:00
Holger Weiss
b017207ac1
mod_admin_extra: Handle empty roster group names
...
Don't let 'add_rosteritem' create a roster group with an empty name.
Thanks to Licaon_Kter for reporting the issue.
2022-09-09 18:27:49 +02:00
Badlop
17a5835143
Simplify recent commit (thanks to Simon Lipp)( #3894 )
2022-09-07 13:57:12 +02:00
Badlop
42e384beb7
Fix unix socket support for ejabberd_http (thanks to Simon Lipp)( #3894 )
2022-09-06 13:34:01 +02:00
Paweł Chmielowski
f624b14636
Add function for getting room diagnostics
2022-09-01 13:37:48 +02:00
Badlop
aaf391b284
Catch all errors from jose_jwt:verify and log debugging details ( #3890 )
2022-09-01 13:02:56 +02:00
Badlop
808def7d32
The #roster_item.ask allowed values are subscribe|undefined
2022-09-01 13:02:54 +02:00
Badlop
7a1ca4b203
mod_host_meta: Complain at start if listener is not encrypted
2022-09-01 13:02:49 +02:00
Holger Weiss
63caa369be
mod_pubsub: Don't crash on command failures
...
Handle 'delete_old_items' and 'delete_expired_items' errors gracefully.
2022-08-31 18:10:22 +02:00
Paweł Chmielowski
fba651822d
Handle invalid values in X-Forwarded-For header more gracefuly
2022-08-29 11:26:31 +02:00
Paweł Chmielowski
cfc8746d29
Update roster_get hook in mod_shared_roster_ldap to use #roster_item{}
2022-08-24 11:14:32 +02:00
Paweł Chmielowski
a9e85674b8
Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it
...
...instead of muc_subscribe
2022-08-24 10:30:02 +02:00
Jonah Brüchert
9a8a843724
Fix filter_nodes
...
The previous implementation always returned an empty list while testing
it. However I don't really understand why that happened. The list
comprehension based one works, although it looks equivalent to me.
2022-08-17 16:37:20 +02:00
Jonah Brüchert
0faf34b26d
Parse sub elements of the mix join remote result
2022-08-17 16:37:20 +02:00
Jonah Brüchert
b1e6e408f8
mod_mix: Return user jid on join
2022-08-17 16:37:20 +02:00
Linus Jahn
4a52b73a17
mod_shared_roster: Fix wrong hook type #roster{} (now #roster_item{})
...
The hook type was changed from #roster{} to #roster_item{} by me in the
recent MIX changes. Unfortunately I've overseen this one (and unit tests
+ dialyzer passed).
2022-08-12 17:07:28 +02:00
Linus Jahn
b0526cd903
mod_mix, mod_mix_pam: Add new MIX namespaces to disco features
2022-08-12 10:53:53 +02:00
Jonah Brüchert
648245e974
mod_mix, mod_mix_pam: Add handling of IQs with newer MIX namespaces
...
Supported are mix:core:{0,1} and mix:pam:{0,2}
2022-08-12 10:53:53 +02:00
Linus Jahn
d6b72f1c5d
mod_roster: Change hook type from #roster{} to #roster_item{}
...
The problem with #roster{} is that every new record entry is also stored
in the mnesia roster table. Adding the mix_participant_id there makes
no sense because the normal roster items are no MIX channels. Using
\#roster_item{} for the hook and #roster{} for storing the normal items
seems to be a better idea.
2022-08-11 12:45:20 +02:00
Linus Jahn
d450d40178
mod_roster: Respect MIX <annotate/> setting
...
MIX extensions are not sent to clients if they haven't been enabled by
the client with <annotate/> in the roster get request.
2022-08-11 12:45:20 +02:00
Linus Jahn
3bf0892c74
mod_mix_pam: Do roster pushes on join/leave
...
Before the channels were added/removed from the database but the
clients were not notified of it.
2022-08-11 12:45:20 +02:00
Linus Jahn
7564a4e953
mod_mix_pam: Provide MIX channels as roster entries via hook
2022-08-11 12:45:20 +02:00
Holger Weiss
e858738736
ejabberd_listener: Let module take over socket
...
For some use cases, it may be necessary to allow a module to take over
socket ownership during initialization.
2022-08-10 18:28:35 +02:00
Badlop
7d8fa3c880
ext_mod: Support managing remote nodes in the cluster
2022-08-05 16:15:05 +02:00
Badlop
72944d895b
ext_mod: Handle correctly when COMMIT.json not found
2022-08-05 16:15:03 +02:00
Badlop
00e6b0c97c
Show allow_query_users room option in disco info ( #3830 )
2022-08-04 12:28:15 +02:00
Mark Zealey
555ff2db4c
Add log_burst_limit_* options ( #3865 )
...
* Add log_burst_limit_* options
On our ejabberd deployment we were sometimes seeing more than 500
msgs/sec of legitimate traffic, however this was getting silently
dropped. Provide config options to enable this limit to be configured
from the config file.
* Pass new logging vars in via ejabberdctl
2022-08-01 12:07:54 +02:00
Paweł Chmielowski
9b647a7afe
Skip connection exit message when we triggered reconnection
2022-07-28 19:25:17 +02:00
Paweł Chmielowski
2b3644c8ac
Handle errors reported from begin/commit inside transaction
2022-07-28 19:24:28 +02:00
Paweł Chmielowski
3d329c7e8f
Make connection close errors bubble up from inside sql transaction
2022-07-28 13:17:35 +02:00
Badlop
1ea53bf940
Add syntax_tools to applications, required when using ejabberd_sql_pt ( #3869 )
2022-07-27 15:16:52 +02:00
Badlop
bc8050eb03
Don't bother with COMMIT.json user-friendly feature in automated user case
2022-07-27 15:16:51 +02:00
Badlop
a38ed7fb2c
Handle not found COMMIT.json, for example in GH Actions
2022-07-27 15:16:49 +02:00
Badlop
033656d70e
Add WebAdmin page for managing external modules
2022-07-26 15:42:13 +02:00
Paweł Chmielowski
7b944444ce
Catch mysql connection being close earlier
2022-07-19 14:35:35 +02:00
Paweł Chmielowski
73167ef1bd
Make first sql reconnect wait shorter time
2022-07-19 14:32:47 +02:00
Paweł Chmielowski
43f36205bd
React to sql driver process exit earlier
...
If there are queued request when connection closes we may try to process
those requests (by trying to send them to already terminated db process,
and waiting until we hit timeout) before we see that driver is not longer
alive. This change adds check for driver exit before we process next
queued sql request, and immediately switch to connection state if we have
one.
2022-07-15 13:51:30 +02:00
Alexey Shchepin
99d9e315a3
Don't set affiliation to 'none' if it's already 'none' in mod_muc_room:process_item_change/3
2022-07-01 09:39:37 +03:00
Linus Jahn
e10c67a74a
mod_mix_pam: Display joined channels on webadmin page
2022-06-28 22:15:04 +02:00
Paweł Chmielowski
06147deccd
Don't register listeners that failed to start in config reload
...
This should alleviate some issues in #3850
2022-06-21 11:09:37 +02:00
Paweł Chmielowski
46c947bc76
Define batch delete function types in coresponding behaviours
2022-06-17 10:35:02 +02:00
Paweł Chmielowski
a2efde185a
Fix mam delete_old_messages_batch for sql backend
...
Too much copy/paste from spool equivalent...
2022-06-17 10:22:57 +02:00
Paweł Chmielowski
a89b1f332d
Use INSERT ... ON DUPLICATE KEY UPDATE for upsert on mysql
...
This can be used for all upsert expressions (where REPLACE INTO used
previously were only possible to use for subset of queries), and may
potentially help with deadlocks reported by mysql when we issues multiple
querier for same key in quick succession.
2022-06-10 16:25:50 +02:00
Badlop
5a2e58e066
Fix regression on stop_ping in clustering context (thanks to fdie)( #3817 )
2022-05-23 16:52:27 +02:00
Badlop
0e25f8d43e
Fix mod_conversejs crash when mod_register not enabled ( #3824 )
2022-05-23 16:49:35 +02:00
Paweł Chmielowski
99064548e8
Fix parsing of scram password from prosody
...
Looks like parsed integer no longer are convered to floats on erlang side,
so let's make check for them less restrictive.
2022-05-17 13:21:30 +02:00
Badlop
4f8e6fe844
Fix errors and warnings for "rebar3 edoc"
2022-05-17 10:42:02 +02:00
Paweł Chmielowski
a916d94000
Pass room state to muc_{un}subscribed hook
2022-05-09 17:32:34 +02:00
Paweł Chmielowski
ed7fc956d5
Allow muc_{un}subscribe hooks to modify sent packets
2022-05-09 16:34:27 +02:00
Paweł Chmielowski
84d8c156a0
Fix spec
2022-05-06 10:15:23 +02:00
Paweł Chmielowski
c7ab3274c5
Return userinfo from misc:uri_parse
2022-05-06 10:14:50 +02:00
Paweł Chmielowski
3d4f2d365f
Have consistent schema type in misc:uri_parse
2022-05-06 10:06:13 +02:00
Paweł Chmielowski
bc9e5c5363
Fix one more place where misc:uri_parse is used
2022-05-05 13:46:02 +02:00
Paweł Chmielowski
54a1fcc5e8
Improve misc:uri_parse
2022-05-05 13:07:03 +02:00
Badlop
aa190ca896
Run 'make options'
2022-05-04 18:01:46 +02:00
Badlop
30b3c6c908
Annotate options and commands recently added
2022-05-04 18:00:58 +02:00
Badlop
2739a52e0f
Update options configurable in default_room_options
2022-05-02 20:20:21 +02:00
Paweł Chmielowski
6f11210edd
Implement batch operations in mnesia backend
2022-05-02 15:05:55 +02:00
Holger Weiss
b5a76fb4de
mod_push: Keep push session ID on session resume
...
Don't forget the push session ID if the client resumes a stream
management session. This makes sure no push notifications are generated
for a connected client with a resumed stream management session.
Thanks to Thilo Molitor for spotting the issue.
2022-05-02 01:54:42 +02:00
Holger Weiss
c148ab4430
Adapt mod_push_keepalive to mod_push changes
...
Adjust mod_push_keepalive to work with the mod_push changes applied by
commit 11574f0a43
.
2022-05-01 17:51:07 +02:00
Holger Weiss
a30d5875ed
mod_push: Rename "timestamp" to "push session ID"
...
The fact that mod_push uses a timestamp as a push session ID is just an
implementation detail. Rename things accordingly to avoid confusion.
However, stick to "timestamp" in the storage modules, as it corresponds
to the database column names/types, there.
2022-05-01 15:49:22 +02:00
Holger Weiss
11574f0a43
mod_push: Fix notifications for pending sessions
...
Fix the problem that no push notifications were triggered in the case
where all of the following conditions applied:
- The XEP-0198 session has been resumed at least once.
- The XEP-0198 session is pending (i.e., the client is disconnected).
- The message wasn't stored in the user's MAM archive (e.g., because it
was of type "groupchat").
The problem was introduced in cd336369a5
.
Many thanks to Friedrich Altheide for reporting the issue and to Thilo
Molitor for his help with tracking it down.
2022-05-01 15:26:21 +02:00
Paweł Chmielowski
d65d04cc9a
Compile elixir_logger_backend only when lager is used
2022-04-29 12:35:16 +02:00
Paweł Chmielowski
881cc42168
Attach meta field with real jid to mucsub subscription events
2022-04-29 11:58:38 +02:00
Jérôme Sautret
69a5a22810
Delete ping timer if resource is gone after the ping has been sent
2022-04-28 14:54:41 +02:00
Paweł Chmielowski
b34291762a
Remove dialyzer warning
2022-04-28 10:18:29 +02:00
Paweł Chmielowski
6fd4315a0c
Guard agains erlang:system_info(logical_processors) not always returning number
2022-04-28 09:51:51 +02:00
Jérôme Sautret
f4959c8b28
Don't send ping if resource is gone
2022-04-26 18:56:38 +02:00
Alexey Shchepin
74e86611ab
Stop empty MUC rooms 30 seconds after creation
2022-04-21 14:38:50 +03:00
Paweł Chmielowski
155261f78a
Fix dialyzer warning
2022-04-20 19:20:16 +02:00
Paweł Chmielowski
e59043db2c
Make oauth_revoke_token work with all backends
2022-04-20 19:07:52 +02:00
Badlop
87445bc74b
Clarify mod_offline's use_mam_for_storage option
2022-04-13 17:33:08 +02:00
Badlop
d8642fc7c2
Fix syntax of some commands' result_example
2022-04-13 17:33:04 +02:00
Badlop
19019bbe32
Add support for MUC room vCard in get_vcard commands
2022-04-12 13:35:55 +02:00
Badlop
10481ed895
mod_cron from ejabberd-contrib is another possible frontend to run commands
2022-04-11 17:04:53 +02:00
Paweł Chmielowski
feb2ad0664
Don't use floor - doesn't exist in R19
2022-04-08 18:27:58 +02:00
Paweł Chmielowski
0870f32c59
Add rate limited delete_old_messages
2022-04-08 17:48:53 +02:00
Paweł Chmielowski
b86fe14ef0
Add rate limited delete_old_mam_messages command
2022-04-08 17:23:42 +02:00
Licaon_Kter
6dbd1118a2
mod_conversejs example, use newer dark theme
...
ref: https://github.com/conversejs/converse.js/releases/tag/v9.1.0
2022-04-06 18:21:43 +02:00
Badlop
170ea134d6
Set Converse auth and register options based on ejabberd configuration
2022-04-06 11:11:21 +02:00
Badlop
b405a3b61e
Fix compilation with Erlang 19
2022-04-06 11:11:18 +02:00
badlop
e3ff868fcd
Merge pull request #3756 from pouriya/Add-Process-Hook-Tracing
...
Add process hook tracing
2022-04-06 11:10:57 +02:00
Holger Weiss
121fc716b0
domain_balancing: Allow for specifying 'type' only
...
Allow for specifying the 'type' of 'domain_balancing' without specifying
the 'component_number' (as per the example in the documentation). The
balancing 'type' is then applied to the dynamic number of component
instances.
2022-04-04 00:14:32 +02:00
Badlop
152956c194
Add more configuration examples
2022-04-01 12:04:08 +02:00
Badlop
6cdb517454
New conversejs_options to setup additional options for Converse
2022-04-01 12:04:07 +02:00
Badlop
94186a36d0
The *_url options now support 'auto'
2022-04-01 12:04:05 +02:00
Badlop
f461bcb597
Improved mod_conversejs to support @HOST@, auto and conversejs_resources
...
Changes:
- The options can use the @HOST@ keyword
- default_domain option is @HOST@ by default, not the first defined vhost
- New conversejs_resources option to serve converse.js files (no need for web server)
- conversejs_* now support 'auto', which uses local or remote Converse files
2022-04-01 12:04:03 +02:00
Badlop
8065ec831e
New mod_host_meta to serve host-meta files, see XEP-0156
2022-04-01 12:04:01 +02:00
Badlop
f19219f5a0
Terminate ejabberd_sm before everything else to ensure sessions closing ( #3641 )
2022-03-25 12:53:25 +01:00
Badlop
0f73d3f4d1
Don't define restart and stop in ejabberd_ctl, use the corresponding commands
2022-03-25 12:51:27 +01:00
Badlop
91c9b0446c
Don't export password attribute when it's empty (it's invalid)( #3705 )
2022-03-25 12:51:24 +01:00
Simon Paitrault
68762146d7
Checking users is active in SM for JWT authenticated user ( #3795 )
...
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2022-03-24 17:03:50 +01:00
Alexey Shchepin
5506b838c8
Add TLS certificate authentication for MQTT connections
2022-03-14 15:41:01 +03:00
Stu Tomlinson
dca49f508f
Sync old-to-new schema script with reality ( #3790 )
...
Update the update_sql function to match current "new" sql schema
2022-03-08 13:56:27 +01:00
Paweł Chmielowski
3520869e36
Use correct timestamp when hibernation_time is not set at all
2022-03-07 17:38:04 +01:00
Alexey Shchepin
d5841785e1
Don't request the whole MUC room state in get_room_occupants_number command ( #3684 ) ( #1964 )
2022-03-07 08:42:42 +03:00
Badlop
d4f288d3c6
Add link in mod_http_api documentation to the docs API section
2022-02-24 01:02:48 +01:00
Badlop
c407b73803
Fix WebSocket uppercase
2022-02-24 01:02:46 +01:00
Badlop
22b469f55d
The lager dependency is used only with old Erlang versions
2022-02-24 01:02:41 +01:00
Paweł Chmielowski
d4bf29e3ff
Improve compatibility with various db engine versions
2022-02-18 20:43:56 +01:00
Paweł Chmielowski
4247501dc6
Fix compilation on OTP < 21 and remove dialyzer warning
2022-02-18 17:21:22 +01:00
Paweł Chmielowski
f86055378d
Optimize room_unused_* commands
...
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
2022-02-18 14:02:04 +01:00
Badlop
b3211b1f71
Update copyright year to 2022
2022-02-11 09:39:25 +01:00
Badlop
4d093ac03e
ejabberd_sql_pt got USE_NEW_SCHEMA in 78dfb83
and removed in e15595d
2022-02-11 09:39:11 +01:00
Badlop
dda60fcf0d
Implement Get List of Registered/Online Users from XEP-0133
2022-02-11 09:39:05 +01:00
Badlop
25e0326f87
Improve explanation of s2s_access option. Add link to access_rules option
2022-02-03 18:21:53 +01:00
Badlop
c92478f7c2
Use the same wording in all the identical options db_type and ram_db_type
2022-02-03 18:21:51 +01:00
Badlop
adbccbe852
New "make relive" similar to "ejabberdctl live" without installing
...
Prepare with:
./autogen.sh && ./configure --with-rebar=./rebar3 && make
Or use this if you installed Elixir:
./autogen.sh && ./configure --with-rebar=mix && make
Start without installing (it recompiles when necessary):
make relive
It stores config, database and logs in _build/relive/
There's available the well-known script:
_build/relive/ejabberdctl
Please note this fails immediately:
r3:do(compile).
This crashes a few seconds later:
rebar3:run(["compile"]).
Workaround that works correctly:
ejabberd_admin:update().
2022-02-03 18:21:47 +01:00
Holger Weiss
67b5de05c7
mod_pubsub: Unsubscribe JID on whitelist removal
...
If a JID is removed from the affiliation lists of a node with access
model 'whitelist', remove it from the list of subscribers as well.
2022-02-02 22:35:28 +01:00
Paweł Chmielowski
11c725018b
Make dialyzer happy
2022-02-02 18:33:45 +01:00
Paweł Chmielowski
9542cca0db
One more place where we need to handle socket field not being available
2022-02-02 16:26:39 +01:00
Paweł Chmielowski
8824a912ef
Don't expect that socket will be available in c2s_terminated hook
...
For detached connection we free socket, so let's make code account for this
(and we really need it for printing debug informations).
This makes sure we call ejabberd_sm:close_session
2022-02-02 16:19:13 +01:00
Paweł Chmielowski
cae4fbb40b
Store all mucsub notifications not only message notifications
...
Previously we stored only message/subject change notifications, but if user
request also change notificaitons for affiliation/config/subscribers then
i don't see reason why we shouldn't store it as well.
2022-02-01 15:18:50 +01:00
Holger Weiss
52ac941034
mod_shared_roster: Adjust special group cache size
...
Let the size of the cache used for 'special' groups (such as @all@ or
@online@) depend on the number of virtual hosts, as the cache will
contain seperate entries per domain.
Thanks to Ingo Jrgensmann for reporting the issue.
2022-01-25 16:57:27 +01:00
Badlop
1b192987d2
Support MQTT subscriptions spread over the cluster ( #3750 )
2022-01-25 13:20:31 +01:00
Badlop
585afcbc77
Pass property name as expected in mqtt_codec (fixes login using MQTT 5)
2022-01-25 13:16:07 +01:00
Kian-Meng Ang
adf0f87e99
Fix typos
2022-01-24 08:02:04 +08:00
Pouriya Jahanbakhsh
259876cb74
feat: event handling
...
run multiple event handlers
generate new events in timing event handlers
print human-readable times
output each callback time info is optional and by default is disabled
2022-01-22 18:17:11 +03:30
Pouriya Jahanbakhsh
20326e8908
feat: process hook tracing
2022-01-21 03:18:55 +03:30
Holger Weiss
0f2d36dc53
mod_pubsub: Allow for limiting item_expire value
...
If mod_pubsub's 'max_item_expire_node' option is specified, reject node
configurations with an 'item_expire' value that exceeds the specified
limit.
2022-01-17 19:08:36 +01:00
Holger Weiss
8e88fa3884
mod_shared_roster: Normalize JID on unset_presence
...
Don't forget to normalize the JID handed over from ejabberd_sm on
presence-unavailable. Without normalization, mod_shared_roster might
fail to look up the storage backend for the given host name, for
example.
Fixes #3752 .
2022-01-15 18:18:24 +01:00
Badlop
a9ac10e876
Document that 'unregister' command deletes data associated with the account
2022-01-13 19:34:37 +01:00
Badlop
1fb908b70f
Document option subscrube_room_many_max_users introduced in fc34661b6
2022-01-13 19:34:10 +01:00
Badlop
1ce3bd256b
Update section URLs in ldap documentation
2022-01-13 19:34:07 +01:00
Badlop
ce14c28faf
Fix version when this command was really updated
2022-01-11 17:28:36 +01:00
Badlop
03a11c63bd
Fix login when generating client id, keep connection record ( #3593 )
2022-01-11 17:19:12 +01:00
Paweł Chmielowski
9ba20d26cb
Add better descripion of subscribe_room_many command
2022-01-05 16:44:05 +01:00
Badlop
cc7ebb86b4
Fix Dialyzer, related to Luerl API update from 0.3 to 1.0
2022-01-04 23:06:30 +01:00
Holger Weiss
59c9500944
mod_muc_room: Fix function name typo
2021-12-30 21:17:11 +01:00
Holger Weiss
3c46e6aba5
Merge remote-tracking branch 'processone/pr/3735'
...
* processone/pr/3735:
node_pep: Add config-node and multi-items features
2021-12-20 09:37:37 +01:00
Alexey Shchepin
fc34661b6f
Add subscribe_room_many command
2021-12-20 09:42:02 +03:00
Alexey Shchepin
a26c9d2475
Optimize user removal handling in mod_muc
2021-12-20 09:42:02 +03:00
Alexey Shchepin
536beedeb6
Accept more types of ejabberdctl commands arguments as JSON-encoded
2021-12-20 09:42:02 +03:00
Linus Jahn
7196f46730
node_pep: Add config-node and multi-items features
...
Fixes #3714 .
2021-12-19 21:06:33 +01:00
Holger Weiss
42bdb501ca
mod_stun_disco: Fix parsing of IPv6 listeners
...
Don't crash if `mod_stun_disco` is used with `offer_local_services`
and an IPv6 listener has an explicit `ip:` address configured.
Thanks to Daniel Kenzelmann for reporting the issue.
2021-12-18 17:50:26 +01:00
Badlop
7e07cba406
Let get_all_rooms handle "global" argument, fixes rooms_unsued_... ( #3726 )
2021-12-15 00:50:17 +01:00
Alexey Shchepin
8b7da70b57
Handle user removal in mod_muc
2021-12-14 09:55:55 +03:00
Badlop
d1bfd6c90d
Annotate modules, options and command major changes in 21.12
2021-12-09 10:55:21 +01:00
Paweł Chmielowski
8d8a3177e1
Eliminate xref warning from last commit
2021-12-06 15:46:52 +01:00
Paweł Chmielowski
7897c3d0e1
Add workaround for bug in older erlang version in rest module
2021-12-06 15:08:10 +01:00
badlop
b173ec0a78
Merge pull request #3652 from weiss/bump-max-items
...
PubSub: Bump default value for 'max_items' limit
2021-12-03 16:11:18 +01:00
Badlop
7fd0eefa30
Run make options
2021-12-03 16:09:58 +01:00
Badlop
dab4c0cc10
New allow_modules option to restrict registration modules
2021-12-03 16:09:55 +01:00
Badlop
0372878ba5
Minor improvements in conversejs documentation
2021-12-03 16:09:10 +01:00
Alexey Shchepin
89ad8a5502
Add mod_conversejs
2021-11-23 08:43:54 +03:00
Badlop
15d3ebb842
Fix Dialyzer warning, old passwd tuple don't match current tuple definition
2021-11-17 17:26:44 +01:00
Paweł Chmielowski
405a5172d5
Improve mod_multicast
2021-11-17 11:32:42 +01:00
Paweł Chmielowski
97b8373fd2
Better version of dialyzer fix
2021-11-16 10:59:53 +01:00
Paweł Chmielowski
bdd4e52699
Make dialyzer happy
2021-11-16 10:57:15 +01:00
Paweł Chmielowski
03817de827
Make s2s connection table cleanup more robust
...
Using monitors instead of doint that from terminate() makes us immune to
s2s handler processes being forcefully killed.
2021-11-16 10:25:03 +01:00
Paweł Chmielowski
132ebb8f2d
Fix exception in mucsub {un}subscription events multicast handler
...
While those event are wrapped in mucsub envelope they doesn't
contain regular messages that require updating 'to' attribute,
so don't process in that same way as events with wrapped
message in them.
2021-11-10 17:04:50 +01:00
Holger Weiss
2cdda4cf49
mod_caps: Don't forget caps on XEP-0198 resumption
...
Many thanks to Thilo Molitor for spotting the issue and testing the fix.
2021-11-06 23:48:49 +01:00
Badlop
4e014d23bd
Improve documentation of some commands
2021-11-05 15:58:00 +01:00
Badlop
b6a2eeebeb
Mention "help" as an available ejabberdctl command
2021-11-05 15:57:57 +01:00
Badlop
684ef60ec3
Annotate support for XEP-0317: Hats, since commit 5d0e599f1
2021-11-05 15:57:53 +01:00
Holger Weiss
13cbd7c35d
mod_pubsub: Remove unused check_opt_range/3 clause
2021-10-31 21:38:49 +01:00
Holger Weiss
65a900668c
node_pep: Fix remove_expired_items/2 argument name
2021-10-31 21:32:45 +01:00
Holger Weiss
2f1611f918
mod_pubsub: Fix get_max_items_node/1 specification
...
Make it explicit that the get_max_items_node/1 function returns
?MAXITEMS if the 'max_items_node' option isn't specified. The function
didn't actually fall back to 'undefined' (but to the 'max_items_node'
default; i.e., ?MAXITEMS) anyway. This change just clarifies the
behavior and adjusts the function specification accordingly.
2021-10-30 13:45:10 +02:00
Holger Weiss
29dcc9b94c
PubSub: Add delete_expired_pubsub_items command
...
Support XEP-0060's pubsub#item_expire feature by adding a command for
deleting expired PubSub items.
Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-10-30 13:19:30 +02:00
Alexey Shchepin
5d0e599f17
Support MUC hats (XEP-0317, conversejs/prosody compatible)
2021-10-29 05:35:16 +03:00
Badlop
54c23a65db
Fix create_room_with_opts when using SQL storage ( #3700 )
2021-10-21 12:44:51 +02:00
Holger Weiss
1377dcf6d2
mod_mam: Declare XEP-0441 support
2021-10-06 01:13:11 +02:00
Badlop
595b016019
Use mod_register in web register form, so its restrictions are used ( #3688 )
2021-10-04 12:08:59 +02:00
Badlop
85408662ff
Use mod_register to format some common error messages
2021-10-04 12:08:56 +02:00
Badlop
d205e6ff1f
Support old scram records before xmpp's 651050f9 and ejabberd's e5cad9be6
( #3680 )
2021-09-27 17:12:17 +02:00
Badlop
f74a715713
Add indexes from 95fa43aa
to the old-to-new schema update function
2021-09-27 13:05:18 +02:00
Badlop
af4b49f720
Update export/import of scram password to XEP-0227 1.1 ( #3676 )
2021-09-22 16:15:22 +02:00
Badlop
ceeba3eea1
Don't crash when exporting a module that is not enabled
2021-09-22 15:30:11 +02:00
Badlop
cfc393a12e
When exporting mod_mam, MUC entries are assigned to the MUC service ( #3680 )
2021-09-22 11:12:28 +02:00
Alexey Shchepin
bf068f5659
Small optimization in mod_roster_sql:get_roster
2021-09-21 12:10:00 +03:00
Alexey Shchepin
32cf44827d
Use INSERT ... ON CONFLICT in SQL_UPSERT for PostgreSQL >= 9.5
2021-09-19 06:20:20 +03:00
Alexey Shchepin
0c403c0f0e
Fix SQL_UPSERT in mod_push_sql:store_session
2021-09-19 06:20:20 +03:00
Badlop
2f5b15129a
Fix previous commit: add forgotten endline blankspaces
2021-09-14 15:13:37 +02:00
Badlop
f8167fc5d0
Update documentation to match the implemented options values ( #3675 )
2021-09-14 13:47:41 +02:00
Alexey Shchepin
5abc03ff8f
Optimize MucSub processing
2021-09-13 08:20:47 +03:00
Holger Weiss
3114ce4ed2
ejabberd_admin: Fix ejabberd_piefxis commands
...
These days, the ejabberd_piefxis commands expect their arguments to be
handed over as binary strings.
2021-09-08 18:34:20 +02:00
Holger Weiss
868387a405
mod_http_upload_quota: Avoid 'max_days' race
...
Try to spread clean-up runs for multiple hosts, rather than scheduling
them in parallel. This should reduce I/O spikes, and avoid race
conditions where multiple processes detect and then try to delete the
same old files (if multiple hosts have the same 'docroot').
Fixes #3497 .
2021-09-05 20:00:05 +02:00
Holger Weiss
caf07692db
mod_register_web: Handle unknown host gracefully
...
Return a proper error message on registration attempts against unknown
hosts, rather than crashing.
Thanks to Ingo Jrgensmann for reporting the bug.
2021-09-05 13:24:51 +02:00
Badlop
91350ad472
Fix WebAdmin recent change
2021-08-27 13:39:06 +02:00
Badlop
f77686481a
Add internal links in WebAdmin Vhosts page
2021-08-27 13:23:24 +02:00
Badlop
b0da69f050
Send ping from server, not bare user JID ( #3658 )
2021-08-27 13:23:15 +02:00
Holger Weiss
ebf03a3745
node_flat: Avoid catch-all clauses for RSM
...
Apply the change made in the previous commit to Mnesia storage as well.
2021-08-23 22:04:03 +02:00
Holger Weiss
c952cc420b
node_flat_sql: Avoid catch-all clauses for RSM
...
Explicitly catch invalid <before/> and <after/> timestamps specified by
clients in RSM queries, but crash on other errors, rather than silently
ignoring those.
2021-08-23 21:28:15 +02:00