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?
This commit is contained in:
Kim Alvefur 2018-12-15 11:55:27 +01:00
parent 968eaf41a8
commit b31939c492

View file

@ -82,7 +82,7 @@ module:hook("muc-voice-request", function(event)
};
local message = st.message({ type = "normal"; from = event.room.jid })
:add_direct_child(voice_request_form:form(formdata));
:add_child(voice_request_form:form(formdata));
event.room:broadcast(message, function (_, occupant)
return occupant.role == "moderator";