24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00
Commit Graph

6162 Commits

Author SHA1 Message Date
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
Badlop
4d0503b6b3 Fix syntax in mod_disco example configuration 2021-08-23 15:49:52 +02:00
Badlop
8b6c90c2d9 Tell dialyzer that gen_tags only cares about markdown output, not html 2021-08-23 15:39:01 +02:00
Badlop
655dcbcb74 New command to produce markdown with tags and their associated commands 2021-08-23 14:04:54 +02:00
Badlop
ac4f240261 Produce module names with specific syntax, docs Makefile will convert to links 2021-08-23 14:04:52 +02:00
Badlop
506e2f3b97 Use specific syntax so modules and top-level will be links
If we use _`whatever`_ here in ejabberd man pages,
it is converted to *`whatever`* in markdown,
and docs.ejabberd.im/Makefile converts to the proper links
2021-08-23 14:04:49 +02:00
Badlop
30ae66e99e Improve formatting and add sections links 2021-08-23 14:04:46 +02:00
Badlop
f5038b86f8 Copy log_rotate_count explanation from docs site 2021-08-23 14:04:44 +02:00
Badlop
9446b251fd Export function, so ACME API commands are listed in the documentation 2021-08-23 14:04:42 +02:00
Badlop
94fb0a65b0 Change set_master command tag from mnesia to cluster 2021-08-23 14:04:40 +02:00
Badlop
69d362595e Remove obsolete mod_register_web ideas and improve documentation 2021-08-23 14:04:37 +02:00
Badlop
b7f7713fae Add example config to mod_http_api documentation 2021-08-23 14:04:35 +02:00
Badlop
8af66b0831 Update API Reference page menu name and order 2021-08-23 14:04:31 +02:00
Holger Weiss
8d5025076f PubSub: Add delete_old_pubsub_items command
Add a command for keeping only the specified number of items on each
node and removing all older items.  This might be especially useful if
nodes may be configured to have no 'max_items' limit.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-22 12:44:50 +02:00
Holger Weiss
29751a6174 PubSub: Optimize publishing on large nodes (SQL)
Avoid an unnecessary SQL query while publishing an item on a PubSub node
without 'max_items' limit.  The query in question can be expensive if
the node has a large number of items.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 20:02:58 +02:00
Holger Weiss
1b0e59bb13 PubSub: Support unlimited number of items
Allow for setting the mod_pubsub option 'max_items_node' to 'unlimited'.
If clients then request a 'max_items' limit of 'max', old items aren't
deleted when publishing new ones.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 12:29:37 +02:00
Holger Weiss
8f8de0403b PubSub: Support 'max_items=max' node configuration
Let clients request the maximum limit for the node configuration option
'max_items' by specifying the special value 'max' instead of an integer.
This was added to XEP-0060, revision 1.17.0 (and clarified in revision
1.20.0).

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-20 20:30:11 +02:00
Holger Weiss
3e942bf4ac mod_mam_sql: Remove duplicated functions 2021-08-07 12:57:57 +02:00
Badlop
fdfd202a30 Determine the default handlerid at runtime
Apparently Elixir's default is not called 'default'
2021-08-05 13:53:12 +02:00
Paweł Chmielowski
d7e330c8ef Allow storing non-composing x:events in offline 2021-08-04 15:30:29 +02:00
Holger Weiss
99ffd9bb95 mod_pubsub: Fix check_opt_range/3 spec 2021-08-02 21:09:55 +02:00
Badlop
ab5e726176 Use the most specific tag for ejabberd commands with several ones 2021-07-30 01:14:36 +02:00
Badlop
b22779f018 Show tags and definer module in generated API document when it's a gen_mod 2021-07-30 01:14:34 +02:00
Badlop
41808a63a0 Show definer module in "ejabberdctl help" when it's a gen_mod 2021-07-30 01:14:31 +02:00
Badlop
ccb4328d06 Store who defines a command, specially when defined by ejabberd modules 2021-07-30 01:14:27 +02:00
Holger Weiss
2050cdffb4 PubSub: Use configured 'max_items' by default
If clients don't ask for a specific 'max_items' limit, use the value of
mod_pubsub's 'max_items_node' option as default, rather than the
hard-coded ?MAXITEMS value.  This makes sure clients cannot circumvent a
smaller, configured limit.
2021-07-28 18:53:15 +02:00