Software /
code /
prosody
Changeset
5082:1ffc788c5696
Merge 0.9->trunk (who has been pushing to trunk?)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Aug 2012 17:21:19 +0100 |
parents | 5081:c0c060e450be (current diff) 5080:52767b1f057b (diff) |
children | 5083:4629c60a303b |
files | |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Aug 05 17:18:35 2012 +0100 +++ b/plugins/muc/muc.lib.lua Sun Aug 05 17:21:19 2012 +0100 @@ -541,7 +541,11 @@ log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); if stanza.name == "iq" then local id = stanza.attr.id; - stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza); + if stanza.attr.type == "get" or stanza.attr.type == "set" then + stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza); + else + stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza); + end if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then stanza.attr.to = jid_bare(stanza.attr.to); end
--- a/tools/erlparse.lua Sun Aug 05 17:18:35 2012 +0100 +++ b/tools/erlparse.lua Sun Aug 05 17:21:19 2012 +0100 @@ -51,7 +51,7 @@ return ch <= _space; end -local escapes = {["\\b"]="\b", ["\\d"]="\d", ["\\e"]="\e", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]="\s", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; +local escapes = {["\\b"]="\b", ["\\d"]="\127", ["\\e"]="\27", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]=" ", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; local function readString() read("\""); -- skip quote local slash = nil; @@ -95,6 +95,12 @@ while isNumeric(peek()) do num[#num+1] = read(); end + if peek() == "." then + num[#num+1] = read(); + while isNumeric(peek()) do + num[#num+1] = read(); + end + end return tonumber(t_concat(num)); end local readItem = nil;