equal
deleted
inserted
replaced
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 |
10 |
11 local function iq_result_handler(event) |
11 local function iq_result_handler(event) |
12 local origin, stanza = event.origin, event.stanza; |
12 local origin, stanza = event.origin, event.stanza; |
|
13 |
|
14 local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); |
|
15 if not query then |
|
16 origin.log("debug", "Wrong iq payload in disco#info result: %s", stanza); |
|
17 return; |
|
18 end |
|
19 |
13 local from = stanza.attr.from; |
20 local from = stanza.attr.from; |
14 local id = stanza.attr.id; |
21 local id = stanza.attr.id; |
15 |
|
16 local query = stanza:get_child("query", "http://jabber.org/protocol/disco#info"); |
|
17 |
|
18 local node_string = query.attr.node; |
22 local node_string = query.attr.node; |
19 local node_query = iq_node_map[from..id]; |
23 local node_query = iq_node_map[from..id]; |
20 if node_string == nil then |
24 if node_string == nil then |
21 node_string = node_query; |
25 node_string = node_query; |
22 query.attr.node = node_query; |
26 query.attr.node = node_query; |