Comparison

plugins/mod_proxy65.lua @ 8642:d2556f237bc2

mod_proxy65: Fix passing number to stanza API (thanks mimi89999)
author Matthew Wild <mwild1@gmail.com>
date Wed, 21 Mar 2018 22:10:24 +0000
parent 6948:e6968e47826d
child 8643:11b6aa30b3e0
comparison
equal deleted inserted replaced
8641:c7734b59506f 8642:d2556f237bc2
121 return true; 121 return true;
122 end 122 end
123 123
124 local sid = stanza.tags[1].attr.sid; 124 local sid = stanza.tags[1].attr.sid;
125 origin.send(st.reply(stanza):tag("query", {xmlns="http://jabber.org/protocol/bytestreams", sid=sid}) 125 origin.send(st.reply(stanza):tag("query", {xmlns="http://jabber.org/protocol/bytestreams", sid=sid})
126 :tag("streamhost", {jid=host, host=proxy_address, port=proxy_port})); 126 :tag("streamhost", {jid=host, host=proxy_address, port=("%d"):format(proxy_port)}));
127 return true; 127 return true;
128 end); 128 end);
129 129
130 module:hook("iq-set/host/http://jabber.org/protocol/bytestreams:query", function(event) 130 module:hook("iq-set/host/http://jabber.org/protocol/bytestreams:query", function(event)
131 local origin, stanza = event.origin, event.stanza; 131 local origin, stanza = event.origin, event.stanza;