Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 8527:0a3dced117f7
MUC: Emit 333 status code on presence as per XEP-0045 1.30 (fixes #1087)
author | Jonas Wielicki <jonas@wielicki.name> |
---|---|
date | Fri, 23 Feb 2018 14:07:16 +0100 |
parent | 8526:f1a46eef9df1 |
child | 8571:44217f40ff4a |
comparison
equal
deleted
inserted
replaced
8526:f1a46eef9df1 | 8527:0a3dced117f7 |
---|---|
369 end | 369 end |
370 occupant:set_session(real_jid, st.presence({type="unavailable"}) | 370 occupant:set_session(real_jid, st.presence({type="unavailable"}) |
371 :tag('status'):text(error_message)); | 371 :tag('status'):text(error_message)); |
372 self:save_occupant(occupant); | 372 self:save_occupant(occupant); |
373 local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";}) | 373 local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";}) |
374 :tag("status", {code = "307"}) | 374 :tag("status", {code = "307"}):up() |
375 :tag("status", {code = "333"}) | |
375 self:publicise_occupant_status(occupant, x); | 376 self:publicise_occupant_status(occupant, x); |
376 if occupant.jid == real_jid then -- Was last session | 377 if occupant.jid == real_jid then -- Was last session |
377 module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;}); | 378 module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;}); |
378 end | 379 end |
379 return true; | 380 return true; |