comparison mod_smacks/mod_smacks.lua @ 2122:3f788f18cc10

mod_smacks: Adjust filter priorities to avoid conflict with mod_websocket
author Kim Alvefur <zash@zash.se>
date Thu, 17 Mar 2016 22:42:11 +0100
parents ea95637cf041
children f1be45c9a742
comparison
equal deleted inserted replaced
2121:4916c1b6517f 2122:3f788f18cc10
113 if not resume then 113 if not resume then
114 session.outgoing_stanza_queue = {}; 114 session.outgoing_stanza_queue = {};
115 session.last_acknowledged_stanza = 0; 115 session.last_acknowledged_stanza = 0;
116 end 116 end
117 117
118 add_filter(session, "stanzas/out", outgoing_stanza_filter, -1000); 118 add_filter(session, "stanzas/out", outgoing_stanza_filter, -999);
119 119
120 local session_close = session.close; 120 local session_close = session.close;
121 function session.close(...) 121 function session.close(...)
122 if session.resumption_token then 122 if session.resumption_token then
123 session_registry[session.resumption_token] = nil; 123 session_registry[session.resumption_token] = nil;
130 130
131 local function wrap_session_in(session, resume) 131 local function wrap_session_in(session, resume)
132 if not resume then 132 if not resume then
133 session.handled_stanza_count = 0; 133 session.handled_stanza_count = 0;
134 end 134 end
135 add_filter(session, "stanzas/in", count_incoming_stanzas, 1000); 135 add_filter(session, "stanzas/in", count_incoming_stanzas, 999);
136 136
137 return session; 137 return session;
138 end 138 end
139 139
140 local function wrap_session(session, resume) 140 local function wrap_session(session, resume)