# HG changeset patch # User Kim Alvefur <zash@zash.se> # Date 1450705713 -3600 # Node ID 5c3d4254d415e9f621caaf3acd2f9598e85930ad # Parent ff734a602886bf2824223e1b6cfac9b11b37fc92 mod_register: Add comment explaining the workaround for replying when the account is being deleted diff -r ff734a602886 -r 5c3d4254d415 plugins/mod_register.lua --- a/plugins/mod_register.lua Mon Dec 21 14:41:38 2015 +0100 +++ b/plugins/mod_register.lua Mon Dec 21 14:48:33 2015 +0100 @@ -98,6 +98,7 @@ 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));