mod_register: Add comment explaining the workaround for replying when the account...
authorKim Alvefur <zash@zash.se>
Mon, 21 Dec 2015 13:48:33 +0000 (14:48 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 21 Dec 2015 13:48:33 +0000 (14:48 +0100)
plugins/mod_register.lua

index a1b4e58198d9c21788b6a939e73844fe27fc9b47..7e1cdc8f7667a0c33f17a3e7adbc3aca67892714 100644 (file)
@@ -98,6 +98,7 @@ local function handle_registration_stanza(event)
                if query.tags[1] and query.tags[1].name == "remove" then
                        local username, host = session.username, session.host;
 
+                       -- This one weird trick sends a reply to this stanza before the user is deleted
                        local old_session_close = session.close;
                        session.close = function(session, ...)
                                session.send(st.reply(stanza));