Diff

plugins/muc/mod_muc.lua @ 7410:45f543c82893

MUC: Split out handling of the room-creating presence into its own method
author Kim Alvefur <zash@zash.se>
date Thu, 28 Apr 2016 22:57:02 +0200
parent 7404:57ca4dcd91a7
child 7411:f385cd6127b2
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Thu Apr 28 22:53:22 2016 +0200
+++ b/plugins/muc/mod_muc.lua	Thu Apr 28 22:57:02 2016 +0200
@@ -273,6 +273,7 @@
 			-- Watch presence to create rooms
 			if stanza.attr.type == nil and stanza.name == "presence" then
 				room = muclib.new_room(room_jid);
+				return room:handle_first_presence(origin, stanza);
 			elseif stanza.attr.type ~= "error" then
 				origin.send(st.error_reply(stanza, "cancel", "not-allowed"));
 				return true;