aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
Commit message (Collapse)AuthorAgeFilesLines
* Merge 0.12->trunkMatthew Wild7 days1-6/+4
|\
| * MUC: optimizations for broadcast of visitor presence (thanks Jitsi team)origin/0.120.12Matthew Wild7 days1-6/+4
| | | | | | | | | | This avoids doing performing unnecessary work in the case of visitors joining a MUC, no functionality changes are intended.
* | MUC: Record reason for affiliation changes and return in list (fixes #1227)Kim Alvefur2021-08-081-4/+11
| |
* | plugins: Prefix module imports with prosody namespaceKim Alvefur2023-03-241-12/+12
|/
* MUC: Allow kicking users with the same affiliation as the kicker (fixes #1724)Matthew Wild2022-03-231-4/+5
| | | | | | | | | | This is allowed by XEP-0045, which states: "A moderator SHOULD NOT be allowed to revoke moderation privileges from someone with a higher affiliation than themselves (i.e., an unaffiliated moderator SHOULD NOT be allowed to revoke moderation privileges from an admin or an owner, and an admin SHOULD NOT be allowed to revoke moderation privileges from an owner)."
* MUC: Switch ID algorithm for IQ relay (fixes #1266, #1435)Kim Alvefur2021-10-051-3/+5
|
* MUC: Remove <{muc}x> tags in some errorsKim Alvefur2021-12-081-2/+2
| | | | | Including the payload of the stanza that caused the error is optional and we're generally not doing it anywhere else.
* MUC: Remove remaining deprecated numeric error codesKim Alvefur2021-12-081-2/+0
| | | | | | The numeric error codes seems to have been removed from the examples in XEP-0045 version 1.24, and were deprecated even by RFC 3920 in 2004, only allowed for backwards compatibility.
* MUC: Return a friendly textual error when trying to speak without voiceKim Alvefur2021-12-081-1/+2
| | | | | | I spend several minutes confused over where the bug was until I remembered I had set myself as visitor in the previous debug session. This would have helped.
* MUC: Allow modules a chance to act prior to room destructionKim Alvefur2021-12-051-4/+12
|
* MUC: Actually set the new affiliation data if it was previously emptyMatthew Wild2021-11-161-0/+1
|
* MUC: Include old affiliation data in affiliation change eventMatthew Wild2021-11-161-0/+1
|
* MUC: Add room:set_affiliation_data()Matthew Wild2021-11-161-0/+22
|
* MUC: Set .previous_affiliation = "none" if nil, for consistency with ↵Matthew Wild2021-11-161-1/+1
| | | | | | .affiliation It appears nothing currently uses this field in prosody or prosody-modules
* MUC: Fix incorrect variable name (thanks luacheck)Matthew Wild2021-11-161-1/+1
|
* MUC: Switch to event.allowed signaling to block event, matching muc-pre-set-roleMatthew Wild2021-11-161-1/+3
| | | | ...and fixing the logic bug that broke everything in the previous commit.
* MUC: Add 'muc-pre-set-affiliation' event, allowing to block change or modify ↵Matthew Wild2021-11-161-10/+20
| | | | data
* MUC: Reject full JID in affiliation queriesKim Alvefur2021-09-171-0/+3
| | | | | | | | | | XEP-0045 states: > Affiliations are granted, revoked, and maintained based on the user's > bare JID, not the nick as with roles. Therefore inclusion of a full JID in affiliation queries is invalid. Thanks to Ge0rG and Poezio for discovering this issue.
* Merge 0.11->trunkKim Alvefur2021-07-231-1/+1
|\
| * MUC: Fix logic for access to affiliation lists0.11.10Kim Alvefur2021-07-221-1/+1
| | | | | | | | | | | | Fixes https://prosody.im/security/advisory_20210722/ Backs out 4d7b925652d9
* | MUC: Allow overriding occupant object from groupchat message eventKim Alvefur2021-03-251-4/+9
| | | | | | | | | | | | | | Use case: Enable module that provides a virtual occupant object for bots Before, if there is no occupant then either some other part of MUC would reject the message or `occupant.nick` would have caused an error.
* | MUC: Reject probes from non-occupantsJC Brand2020-10-021-12/+21
| | | | | | | | Also test for self-probes
* | MUC: Add support for presence probes (fixes #1535)JC Brand2020-04-191-23/+84
| | | | | | | | | | | | | | | | | | | | | | The following patch allows Prosody to respond to `probe` presences and send out the probed occupant's current presence. This is based on line 17.3 in XEP-0045: A MUC service MAY handle presence probes sent to the room JID <room@service> or an occupant JID <room@service/nick> (e.g, these might be sent by an occupant's home server to determine if the room is still online or to synchronize presence information if the user or the user's server has gone offline temporarily or has started sharing presence again, as for instance when Stanza Interception and Filtering Technology (XEP-0273) is used).
* | Merge 0.11->trunkMatthew Wild2020-12-151-2/+2
|\|
| * MUC: Fix logic bug causing unnecessary presence to be sent, fixes #1615 ↵Matthew Wild2020-12-151-2/+2
| | | | | | | | (thanks damencho)
* | Merge 0.11->trunkKim Alvefur2020-10-071-2/+2
|\|
| * MUC: Preserve disco 'node' attribute (or lack thereof) in response (fix ↵Kim Alvefur2020-10-071-2/+2
| | | | | | | | #1595) (thanks lessthan3)
* | mod_muc: let event handlers modify cloned presenceJC Brand2020-04-221-1/+1
| | | | | | | | Updates #1533
* | Fixes #1533 Hats don't get sent out to own MUC userJC Brand2020-04-221-0/+1
| |
* | Merge 0.11->trunkMatthew Wild2020-04-231-1/+1
|\|
| * MUC: Always include 'affiliation'/'role' attributes, defaulting to 'none' if nilMatthew Wild2020-04-231-1/+1
| |
| * MUC: Persist affiliation_data in new MUC format!Matthew Wild2020-03-121-0/+1
| |
* | MUC: Add new event 'muc-build-occupant-presence' for plugins to extend ↵Matthew Wild2020-04-111-0/+2
| | | | | | | | occupant presence
* | MUC: Persist affiliation_data in new MUC format!Matthew Wild2020-03-121-0/+1
| |
* | MUC: Switch to new storage format by defaultMatthew Wild2020-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Changing the default setting of `new_muc_storage_format` from false to true. The code supports reading both formats since 0.11, but servers with MUCs stored using the new format will not be able to downgrade to 0.10 or earlier. The new format is clearer (less nesting for the most commonly-accessed data), and combined with the new map-store methods, allows for some operations to become more efficient (such as finding out which MUCs on a service a given user is affiliated with).
* | MUC: Support for broadcasting unavailable presence for affiliated offline usersMatthew Wild2020-03-121-2/+23
| | | | | | | | Activated when muc#roomconfig_presencebroadcast includes the "none" role.
* | MUC: Pass previous role to :publicise_occupant_status() when destroying a MUCMatthew Wild2020-03-121-3/+4
| |
* | MUC: Pass previous role to :publicise_occupant_status() whenever possibleMatthew Wild2020-03-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there is what amounts to a hack in presence_broadcast.lib.lua to make it always broadcast presence with roles of "none". This is to ensure that if you previously saw available presence for someone, you will also see the unavailable presence (which always has role="none"). The correct approach is to take into account what the previous role was ( i.e. answer the question: "Was the available presence for this occupant a role for which presence broadcast is enabled?). The logic is already in place to do this correctly, but most call sites do not provide the previous role (prev_role argument) of the occupant, which causes it to not be used. In its place the hack to always broadcast presence of role="none" has allowed things to continue to work. The intention is that a subsequent commit will remove the unconditional broadcast of role="none".
* | mod_muc: add muc-private-message eventMaxime “pep” Buquet2020-02-241-1/+3
| | | | | | | | | | This seems to be the one place handling MUC-PMs. This event is added so that plugins (such as muc_occupant_id) can edit them without having to redo the work.
* | MUC: Make note to handle configuration form errors [luacheck]Kim Alvefur2019-12-231-0/+2
| |
* | MUC: Remove some unused variables [luacheck]Kim Alvefur2019-12-231-4/+4
| |
* | MUC: Add missing reference to room (thanks buildbot) [luacheck]Kim Alvefur2019-11-261-0/+1
| |
* | MUC: Indicate that the room is the origin of various errors where 'from' is ↵Kim Alvefur2019-11-251-13/+16
| | | | | | | | an occupant JID
* | Merge 0.11->trunkKim Alvefur2019-11-231-37/+100
|\ \ | |/ |/|
| * MUC: Enforce strict resourceprep on nicknames (bye bye robot face)Kim Alvefur2019-09-231-0/+16
| |
| * MUC: Add controls for whose presence is broadcast (closes #1335)Lance Stout2019-10-201-5/+18
| | | | | | | | Committed by Zash
| * Merge 0.11-trunkKim Alvefur2019-09-291-0/+1
| |\
| * \ Merge 0.11->trunkKim Alvefur2019-08-211-0/+1
| |\ \
| * | | MUC: Reflow event tables to improve readabilityKim Alvefur2019-06-191-4/+20
| | | | | | | | | | | | | | | | Also makes it easier to read diffs of added fields.
| * | | MUC: Update error message for consistencyMatthew Wild2019-03-181-1/+1
| | | |