aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_smacks.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-13 21:46:49 +0100
committerKim Alvefur <zash@zash.se>2021-12-13 21:46:49 +0100
commitda18622846fc28ac0746e44b6e39f75245f6f45f (patch)
tree8a137252f2a27116639c68968a993584449abb67 /plugins/mod_smacks.lua
parent50b57fb062ac2cacce513c682c82ad7315953863 (diff)
downloadprosody-da18622846fc28ac0746e44b6e39f75245f6f45f.tar.gz
prosody-da18622846fc28ac0746e44b6e39f75245f6f45f.zip
mod_smacks: Patch various self-references on the resumed session
The number of places where the session is an upvalue to its own methods is too high!
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r--plugins/mod_smacks.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index 104b75af..15eacae2 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -571,11 +571,16 @@ function handle_resume(session, stanza, xmlns_sm)
local migrated_session_log = session.log;
original_session.ip = session.ip;
original_session.conn = session.conn;
+ original_session.rawsend = session.rawsend;
+ original_session.rawsend.session = original_session;
+ original_session.rawsend.conn = original_session.conn;
original_session.send = session.send;
+ original_session.send.session = original_session;
original_session.close = session.close;
original_session.filter = session.filter;
original_session.filter.session = original_session;
original_session.filters = session.filters;
+ original_session.send.filter = original_session.filter;
original_session.stream = session.stream;
original_session.secure = session.secure;
original_session.hibernating = nil;