Mercurial > prosody-modules
comparison mod_cache_c2s_caps/mod_cache_c2s_caps.lua @ 3464:13b394b0db82
mod_cache_c2s_caps: Fail to load if module:send_iq() is not available
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 14 Feb 2019 17:06:16 +0000 |
| parents | b85622b577ad |
| children | 820c891a54cc |
comparison
equal
deleted
inserted
replaced
| 3463:2aaf93d2b219 | 3464:13b394b0db82 |
|---|---|
| 5 -- Map of jid..node, to avoid querying the same client multiple times for the same value. | 5 -- Map of jid..node, to avoid querying the same client multiple times for the same value. |
| 6 local in_flight_iqs = {} | 6 local in_flight_iqs = {} |
| 7 | 7 |
| 8 -- Some clients (*ahem* poezio…) don’t include the @node in their result iq. | 8 -- Some clients (*ahem* poezio…) don’t include the @node in their result iq. |
| 9 local iq_node_map = {} | 9 local iq_node_map = {} |
| 10 | |
| 11 assert(module.send_iq, "This module is not compatible with this version of Prosody."); | |
| 10 | 12 |
| 11 local function iq_result_handler(event) | 13 local function iq_result_handler(event) |
| 12 local origin, stanza = event.origin, event.stanza; | 14 local origin, stanza = event.origin, event.stanza; |
| 13 | 15 |
| 14 local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); | 16 local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); |
