# HG changeset patch # User Matthew Wild # Date 1603376915 -3600 # Node ID a9be85b2da17b425b4cb64ad385efb341a071bba # Parent 4300839a28ca4bca5eee7c7eb250eed26ed6ca0e# Parent cf31a5ef8a9bcf64055b912095711fcc2deb1341 Merge diff -r cf31a5ef8a9b -r a9be85b2da17 buildscripts/squish --- a/buildscripts/squish Fri Oct 02 16:42:37 2020 +0200 +++ b/buildscripts/squish Thu Oct 22 15:28:35 2020 +0100 @@ -2197,7 +2197,7 @@ }\ }\ else {\ - // Unreachable because SHELL is dependant on the others\ + // Unreachable because SHELL is dependent on the others\ throw 'Unknown runtime environment. Where are we?';\ }\ function globalEval(x) {\ @@ -2562,7 +2562,7 @@ // @param ident The name of the C function (note that C++ functions will be name-mangled - use extern \"C\")\ // @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and\ // 'array' for JavaScript arrays and typed arrays; note that arrays are 8-bit).\ -// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType,\ +// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be omitted). Types are as in returnType,\ // except that 'array' is not possible (there is no way for us to know the length of the array)\ // @param args An array of the arguments to the function, as native JS values (as in returnType)\ // Note that string arguments will be stored on the stack (the JS string will become a C string on the stack).\ diff -r cf31a5ef8a9b -r a9be85b2da17 client.lua --- a/client.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/client.lua Thu Oct 22 15:28:35 2020 +0100 @@ -3,7 +3,6 @@ local jid_split = require "util.jid".split; local adns = require "net.adns"; -local lxp = require "lxp"; local st = require "util.stanza"; -- Shortcuts to save having to load util.stanza diff -r cf31a5ef8a9b -r a9be85b2da17 doc/example.lua --- a/doc/example.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/doc/example.lua Thu Oct 22 15:28:35 2020 +0100 @@ -5,7 +5,7 @@ -- handy if you're hacking on Verse itself --os.execute("squish --minify-level=none verse"); -require "verse".init("client"); +local verse = require "verse".init("client"); c = verse.new(); c:add_plugin("version"); diff -r cf31a5ef8a9b -r a9be85b2da17 libs/encodings.lua --- a/libs/encodings.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/libs/encodings.lua Thu Oct 22 15:28:35 2020 +0100 @@ -6,7 +6,11 @@ module "encodings" +idna = {}; stringprep = {}; base64 = { encode = mime.b64, decode = mime.unb64 }; +utf8 = { + valid = (utf8 and utf8.len) and function (s) return not not utf8.len(s); end or function () return true; end; +}; return _M; diff -r cf31a5ef8a9b -r a9be85b2da17 plugins/archive.lua --- a/plugins/archive.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/plugins/archive.lua Thu Oct 22 15:28:35 2020 +0100 @@ -42,7 +42,6 @@ local result_tag = message:get_child("result", xmlns_mam); if result_tag and result_tag.attr.queryid == queryid then local forwarded = result_tag:get_child("forwarded", xmlns_forward); - forwarded = forwarded or message:get_child("forwarded", xmlns_forward); -- COMPAT XEP-0313 pre 2013-05-31 local id = result_tag.attr.id; local delay = forwarded:get_child("delay", xmlns_delay); @@ -63,9 +62,9 @@ callback(false, reply:get_error()) return true; end - local finnished = reply:get_child("fin", xmlns_mam) - if finnished then - local rset = rsm.get(finnished); + local finished = reply:get_child("fin", xmlns_mam) + if finished then + local rset = rsm.get(finished); for k,v in pairs(rset or NULL) do results[k]=v; end end callback(results); diff -r cf31a5ef8a9b -r a9be85b2da17 plugins/disco.lua --- a/plugins/disco.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/plugins/disco.lua Thu Oct 22 15:28:35 2020 +0100 @@ -328,9 +328,8 @@ end, 50); stream:hook("presence-out", function (presence) - if not presence:get_child("c", xmlns_caps) then - presence:reset():add_child(stream:caps()):reset(); - end + presence:remove_children("c", xmlns_caps); + presence:reset():add_child(stream:caps()):reset(); end, 10); end diff -r cf31a5ef8a9b -r a9be85b2da17 plugins/jingle_ibb.lua --- a/plugins/jingle_ibb.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/plugins/jingle_ibb.lua Thu Oct 22 15:28:35 2020 +0100 @@ -28,7 +28,7 @@ return self:feed(stanza) end self.feeder = feeder; - print("Hooking incomming IQs"); + print("Hooking incoming IQs"); local stream = self.stream; stream:hook("iq/".. xmlns_ibb, feeder) if stanza == "message" then diff -r cf31a5ef8a9b -r a9be85b2da17 plugins/tls.lua --- a/plugins/tls.lua Fri Oct 02 16:42:37 2020 +0200 +++ b/plugins/tls.lua Thu Oct 22 15:28:35 2020 +0100 @@ -10,7 +10,7 @@ stream:send(verse.stanza("starttls", { xmlns = xmlns_tls })); return true; elseif not stream.conn.starttls and not stream.secure then - stream:warn("SSL libary (LuaSec) not loaded, so TLS not available"); + stream:warn("SSL library (LuaSec) not loaded, so TLS not available"); elseif not stream.secure then stream:debug("Server doesn't offer TLS :("); end