#1087 Implement support for XEP-0045 update 1.30

Reporter Jonas Wielicki
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Status-Fixed
  • Milestone-0.11
  • Priority-Medium
  • Patch
  • Type-Enhancement
  1. Jonas Wielicki on

    Description of feature: XEP-0045 1.30 specifies the 333 status code for kicks due to errors: https://xmpp.org/extensions/xep-0045.html#service-error-kick Motivation: See the lengthy discussion in #949 and #939 why this is desirable to have. Proposed patch for trunk: diff -r f1a46eef9df1 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Fri Oct 20 05:18:58 2017 +0200 +++ b/plugins/muc/muc.lib.lua Fri Feb 23 09:47:23 2018 +0100 @@ -371,7 +371,8 @@ :tag('status'):text(error_message)); self:save_occupant(occupant); local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";}) - :tag("status", {code = "307"}) + :tag("status", {code = "307"}):up() + :tag("status", {code = "333"}) self:publicise_occupant_status(occupant, x); if occupant.jid == real_jid then -- Was last session module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;}); I’m not entirely sure this does the right think, I’m wary because it doesn’t ``:up()`` the ``x`` after adding the status element; but the original code didn’t do that either. Also lack of semicolon. Untested. I don’t have a patch for 0.10. I took a look, but I think that how the 0.10-MUC handles this makes it rather difficult to implement, probably not worth the trouble.

  2. MattJ on

    Changes
    • tags Status-Accepted Patch Milestone-0.11
  3. Zash on

    Patch looks correct. Would you like to commit?

    Changes
    • owner Zash
    • tags
  4. Zash on

    Merged as https://hg.prosody.im/trunk/rev/0a3dced117f7 Thanks!

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.