aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* mod_websocket: Merge session close handling changes from mod_c2s (bug fixes)origin/13.013.0Matthew Wild27 hours1-11/+17
| | | | | | | | | | | | | | | | | This should bring some fixes and general robustness that mod_websocket had missed out on. The duplicated code here is not at all ideal. To prevent this happening again, we should figure out how to have the common logic in a single place, while still being able to do the websocket-specific parts that we need. The main known bug that this fixes is that it's possible for a session to get into a non-destroyable state. For example, if we try to session:close() a hibernating session, then session.conn is nil and the function will simply return without doing anything. In the mod_c2s code we already handle this, and just destroy the session. But if a hibernating websocket session is never resumed or becomes non-resumable, it will become immortal! By merging the fix from mod_c2s, the session should now be correctly destroyed.
* mod_c2s: Code formatting changeMatthew Wild27 hours1-2/+6
| | | | | | Although we do sometimes use single-line if blocks, I'm expanding this one to make it easier to compare with the duplicated (but modified) code in mod_websocket that we plan to de-duplicate one day.
* mod_storage_internal: Use UUIDv7 for message idsMatthew Wild2 days1-2/+2
| | | | | | This matches what we use for SQL already, so provides some consistency. Client developers prefer sortable ids.
* mod_external_services: Also use TURN REST credential algo for 'turns' ↵Matthew Wild11 days1-0/+1
| | | | (thanks moreroid)
* mod_component: Don't return error reply for errors, fixes #1897Kim Alvefur2025-02-221-1/+3
|
* mod_bosh,mod_websocket: Don't load mod_http_altconnect in global contextKim Alvefur2025-02-222-2/+6
| | | | | | It blocked loading on VirtualHosts since it was already loaded globally Thanks eTaurus
* mod_invites: Hide --group flag unless mod_invites_groups is enabledMatthew Wild2025-02-171-1/+6
| | | | | | The WIP groups support is not complete yet, and won't work without extra modules (which are not yet a part of Prosody). For now we hide --group support unless mod_invites_groups (community module) is specified in modules_enabled.
* mod_invites: Fix traceback when no flags passedMatthew Wild2025-02-171-6/+6
|
* mod_invites: Deprecate 'mod_invites generate' in favour of new shell commandsMatthew Wild2025-02-171-108/+61
|
* mod_admin_shell: Improve help listing in non-REPL modeMatthew Wild2025-02-171-2/+36
|
* mod_admin_shell: Fix simple command execution (e.g. help)Matthew Wild2025-02-171-3/+15
|
* mod_admin_shell: Set flag on session when in REPL modeMatthew Wild2025-02-171-0/+4
|
* mod_admin_shell: Improved error handling for shell-invoked commandsMatthew Wild2025-02-171-5/+25
|
* mod_admin_shell, util.prosodyctl.shell: Process command-line args on ↵Matthew Wild2025-02-171-18/+95
| | | | | | | | | | | | server-side, with argparse support This allow a shell-command to provide a 'flags' field, which will automatically cause the parameters to be fed through argparse. The rationale is to make it easier for more complex commands to be invoked from the command line (`prosodyctl shell foo bar ...`). Until now they were limited to accepting a list of strings, and any complex argument processing was non-standard and awkward to implement.
* mod_invites: Fix storing --group (thanks lissine)Kim Alvefur2025-02-171-1/+1
| | | | | | | This made it ignore `--group` completely, but if you incorrectly used `--group foo` it would store `groups=true`. Introduced in 9ba11ef91ce4
* mod_bosh, mod_websocket: Add soft dependency on mod_http_altconnectMatthew Wild2025-02-162-0/+4
|
* mod_http_altconnect: Imported from prosody-modules 6d5a19bdd718 w/changesMatthew Wild2025-02-161-0/+52
| | | | | | | Changes from community version: - Add options to allow explicit control over whether BOSH/WS is advertised - Always serve XML at /host-meta (no guessing based on Accept), least surprising
* mod_http_file_share: Persist total storage usage when it increases (fixes #1891)Matthew Wild2025-02-151-0/+1
|
* core.certmanager: Move LuaSec verification tweaks to mod_s2sKim Alvefur2025-02-151-0/+8
| | | | | These two settings are only really needed for XMPP server-to-server connections.
* mod_cloud_notify, mod_cron, mod_invites: Add 'prosody.' prefix to requiresMatthew Wild2025-02-153-10/+10
|
* MUC: Use new XEP namespace for hats by defaultMatthew Wild2025-02-141-1/+1
| | | | Revert with muc_hats_compat = true in the config if necessary.
* mod_admin_shell: Remove duplicated lineMatthew Wild2025-02-131-2/+0
|
* mod_admin_shell: Rename user:setrole to user:set_rolesMatthew Wild2025-02-131-4/+4
| | | | | This is more readable and accessible, and it will only be harder to change after release.
* mod_admin_shell: Hide secondary role commands, focus on primary rolesMatthew Wild2025-02-131-7/+17
| | | | | | | | | Secondary roles are an advanced feature without any strong use cases currently. Having multiple ways to manage roles is confusing. Now the 'user:role' command will just show the primary role if that is all there is, but will list secondary roles too if there are any (which in 99.9% of cases there won't be).
* mod_admin_shell: Support for hiding certain commands from default help listingMatthew Wild2025-02-131-5/+8
| | | | Useful for e.g. deprecated commands.
* mod_account_activity: Fix error when no duration specified in shell commandMatthew Wild2025-02-131-1/+1
|
* mod_admin_shell: Fix result handling of user addrole/delrole commandsMatthew Wild2025-02-131-2/+10
|
* mod_authz_internal: Fix error messagesMatthew Wild2025-02-131-2/+2
|
* mod_authz_internal: Fix return values of secondary role management methodsMatthew Wild2025-02-131-3/+8
| | | | usermanager expects (role, err) and (ok, err)
* mod_presence: Fix traceback if origin gets disconnected during processingMatthew Wild2025-02-131-2/+10
| | | | Fixes #1887
* mod_invites: Add shell commands to list, show and delete pending invitationsMatthew Wild2025-02-131-0/+140
|
* mod_invites: Shell command to create reset linksMatthew Wild2025-02-131-0/+18
|
* mod_account_activity: Add shell command to list inactive accountsMatthew Wild2025-02-121-0/+43
| | | | Including accounts which may never have logged in.
* mod_account_activity: Fix required module namesMatthew Wild2025-02-121-3/+3
|
* mod_account_activity: Record an account's last activity timestampMatthew Wild2025-02-121-0/+109
| | | | | | | | | | | | | This is similar to mod_lastlog/mod_lastlog2. Some functionality was dropped, compared to mod_lastlog2. These features (recording the IP address, or tracking the timestamp of multiple events) are handled better by the mod_audit family of modules. For example, those correctly handle multiple logins, IP address truncation, and data retention policies. The "registered" timestamp from mod_lastlog2 was also dropped, as this has been stored in account_details by Prosody itself since at least 0.12 already.
* mod_storage_sql: Fix tests for SQLite3Kim Alvefur2025-02-081-1/+1
| | | | Tests does not run the code that initializes `sqlite_version`
* MUC: Don't inform people about the avatar hash when there is noneMatthew Wild2025-02-071-0/+1
|
* mod_vcard: Switch store name for MUC hosts (thanks lissine)Matthew Wild2025-02-061-2/+8
|
* mod_muc: Integrate support for vcards/avatars on MUC roomsMatthew Wild2025-02-062-0/+85
| | | | | | This was previously served by a community module (mod_vcard_muc). It can be disabled by setting `vcard_muc = false` in the config.
* mod_vcard: Some support for handling vcards on componentsMatthew Wild2025-02-061-3/+7
|
* mod_vcard: Fire event when vcard updatedMatthew Wild2025-02-061-0/+1
|
* mod_vcard: Add API to get hash of the vcard avatarMatthew Wild2025-02-061-0/+13
|
* mod_c2s: Add debug log when disconnecting all user sessionsMatthew Wild2025-02-061-0/+1
|
* mod_admin_shell: Fix column alignment in 'help roles'Kim Alvefur2025-02-021-1/+1
|
* mod_admin_shell: Fix help forgetting argumentsKim Alvefur2025-02-021-1/+1
| | | | | | The array:pluck() method mutates the args, replacing the table items with the resulting strings. On later runs I assume it tries to index the string, which returns nil, emptying the array.
* mod_tokenauth: Fix expiry lasting one second too muchRémi Bardon2025-02-011-5/+5
| | | | | | | | | Because the code was using `< now` in a lot of places, things expiring at the current second wouldn't be marked as expired. It isn't noticeable in real-world scenarios but I wanted to create OAuth 2.0 tokens valid for 0 second in integration tests and it wasn't possible. By using `<=` instead of `<`, we make sure tokens don't live a single millisecond more than what they are supposed to.
* mod_storage_sql: Don't treat Enter or Ctrl-C as yes in upgrade commandKim Alvefur2025-01-231-1/+1
| | | | | It seems to imply that No is the default, so it shouldn't continue doing the Yes action unless you actually press Y
* mod_storage_sql: Detect SQLite3 without UPSERT (or SQLCipher 3.x)Kim Alvefur2025-01-231-1/+23
| | | | | | | | | | | | | | | | | | SQLCipher v3.4.1 (the version in Debian 12) is based on SQLite3 v3.15.2, while UPSERT support was introduced in SQLite3 v3.24.0 This check was not needed before because we v3.24.0 has not been in a version of Debian we support for a long, long time. Note however that SQLCipher databases are not compatible across major versions, upgrading from v3.x to v4.x requires executing a migration. Attempts at making `prosodyctl mod_storage_sql upgrade` perform such a migration has not been successful. Executing the following in the `sqlcipher` tool should do the migration: PRAGMA key = '<key material>'; PRAGMA cipher_migrate;
* mod_admin_shell: Remove log statement intended for development onlyMatthew Wild2025-01-161-1/+0
|
* mod_pubsub: Remove duplicate create_node commandMatthew Wild2025-01-141-16/+0
| | | | Removed the one without error handling.