Mercurial > prosody-hg
comparison plugins/muc/request.lib.lua @ 9703:0cfb7b3593eb 0.11
MUC: Fix traceback when requesting voice (fixes #1269) (thanks jonas’)
Introduced by change from add_child to add_direct_child in ce57c69a20e2
Why does add_direct_child not return self like everything else?
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 15 Dec 2018 11:55:27 +0100 |
| parents | ce57c69a20e2 |
| children | 74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 9698:e616c37756b3 | 9703:0cfb7b3593eb |
|---|---|
| 80 ["muc#jid"] = event.stanza.attr.from; | 80 ["muc#jid"] = event.stanza.attr.from; |
| 81 ["muc#roomnick"] = nick; | 81 ["muc#roomnick"] = nick; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 local message = st.message({ type = "normal"; from = event.room.jid }) | 84 local message = st.message({ type = "normal"; from = event.room.jid }) |
| 85 :add_direct_child(voice_request_form:form(formdata)); | 85 :add_child(voice_request_form:form(formdata)); |
| 86 | 86 |
| 87 event.room:broadcast(message, function (_, occupant) | 87 event.room:broadcast(message, function (_, occupant) |
| 88 return occupant.role == "moderator"; | 88 return occupant.role == "moderator"; |
| 89 end); | 89 end); |
| 90 end | 90 end |
