Software /
code /
prosody
Comparison
plugins/mod_dialback.lua @ 8514:671343e92070
mod_dialback: Use renamed API for hooking non-stanza tags
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Feb 2018 01:06:40 +0100 |
parent | 8509:e1d274001855 |
child | 8515:cbb5f4488b1b |
comparison
equal
deleted
inserted
replaced
8513:c6be9bbd0a1a | 8514:671343e92070 |
---|---|
187 end | 187 end |
188 return true; | 188 return true; |
189 end | 189 end |
190 end); | 190 end); |
191 | 191 |
192 module:hook_stanza("urn:ietf:params:xml:ns:xmpp-sasl", "failure", function (origin, stanza) | 192 module:hook_tag("urn:ietf:params:xml:ns:xmpp-sasl", "failure", function (origin, stanza) |
193 if origin.external_auth == "failed" then | 193 if origin.external_auth == "failed" then |
194 module:log("debug", "SASL EXTERNAL failed, falling back to dialback"); | 194 module:log("debug", "SASL EXTERNAL failed, falling back to dialback"); |
195 initiate_dialback(origin); | 195 initiate_dialback(origin); |
196 return true; | 196 return true; |
197 end | 197 end |
198 end, 100); | 198 end, 100); |
199 | 199 |
200 module:hook_stanza(xmlns_stream, "features", function (origin, stanza) | 200 module:hook_tag(xmlns_stream, "features", function (origin, stanza) |
201 if not origin.external_auth or origin.external_auth == "failed" then | 201 if not origin.external_auth or origin.external_auth == "failed" then |
202 module:log("debug", "Initiating dialback..."); | 202 module:log("debug", "Initiating dialback..."); |
203 initiate_dialback(origin); | 203 initiate_dialback(origin); |
204 return true; | 204 return true; |
205 end | 205 end |