Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
7409:9a3ce6da3256 | 7410:45f543c82893 |
---|---|
271 local room = get_room_from_jid(room_jid); | 271 local room = get_room_from_jid(room_jid); |
272 if room == nil then | 272 if room == nil then |
273 -- Watch presence to create rooms | 273 -- Watch presence to create rooms |
274 if stanza.attr.type == nil and stanza.name == "presence" then | 274 if stanza.attr.type == nil and stanza.name == "presence" then |
275 room = muclib.new_room(room_jid); | 275 room = muclib.new_room(room_jid); |
276 return room:handle_first_presence(origin, stanza); | |
276 elseif stanza.attr.type ~= "error" then | 277 elseif stanza.attr.type ~= "error" then |
277 origin.send(st.error_reply(stanza, "cancel", "not-allowed")); | 278 origin.send(st.error_reply(stanza, "cancel", "not-allowed")); |
278 return true; | 279 return true; |
279 else | 280 else |
280 return; | 281 return; |