From ee9ef878c4f1702f3bacfd8d3c0c98844c3b481f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 16 Mar 2013 17:46:43 +0100 Subject: mod_s2s, mod_saslauth, mod_compression: Refactor to have common code for opening streams --- plugins/mod_compression.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins/mod_compression.lua') diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua index 67a88eb9..44bc05fe 100644 --- a/plugins/mod_compression.lua +++ b/plugins/mod_compression.lua @@ -141,10 +141,7 @@ module:hook("stanza/http://jabber.org/protocol/compress:compressed", function(ev -- setup decompression for session.data setup_decompression(session, inflate_stream); session:reset_stream(); - local default_stream_attr = {xmlns = "jabber:server", ["xmlns:stream"] = "http://etherx.jabber.org/streams", - ["xmlns:db"] = 'jabber:server:dialback', version = "1.0", to = session.to_host, from = session.from_host}; - session.sends2s(""); - session.sends2s(st.stanza("stream:stream", default_stream_attr):top_tag()); + session:open_stream(); session.compressed = true; return true; end -- cgit v1.2.3