# HG changeset patch # User Kim Alvefur # Date 1461877073 -7200 # Node ID f385cd6127b23b73549fe67a0535876958f2f449 # Parent 45f543c82893f41b0214fbd7cfe2e21f69beb355 MUC: Add event for when room is done being created diff -r 45f543c82893 -r f385cd6127b2 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Thu Apr 28 22:57:02 2016 +0200 +++ b/plugins/muc/mod_muc.lua Thu Apr 28 22:57:53 2016 +0200 @@ -210,7 +210,7 @@ end end); -module:hook("muc-room-pre-create", function(event) +module:hook("muc-room-created", function(event) track_room(event.room); end, -1000); diff -r 45f543c82893 -r f385cd6127b2 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Thu Apr 28 22:57:02 2016 +0200 +++ b/plugins/muc/muc.lib.lua Thu Apr 28 22:57:53 2016 +0200 @@ -435,6 +435,12 @@ origin = origin; jid = real_jid; }); + module:fire_event("muc-room-created", { + room = self; + creator = dest_occupant; + stanza = stanza; + origin = origin; + }); return true; end