Comparison

plugins/muc/muc.lib.lua @ 6924:c37ad3e1fdd9

Merge 0.9->0.10
author Matthew Wild <mwild1@gmail.com>
date Tue, 17 Nov 2015 17:04:04 +0000
parent 6831:428b8da1cfce
parent 6923:f755e0bdc60a
child 6925:3c4799467dae
child 6982:c515f9491ce6
comparison
equal deleted inserted replaced
6921:45fa2e554c79 6924:c37ad3e1fdd9
359 359
360 return from_nick, to_jid, base64.encode(to_jid.."\0"..stanza.attr.id.."\0"..md5(from_jid)); 360 return from_nick, to_jid, base64.encode(to_jid.."\0"..stanza.attr.id.."\0"..md5(from_jid));
361 end 361 end
362 local function deconstruct_stanza_id(room, stanza) 362 local function deconstruct_stanza_id(room, stanza)
363 local from_jid_possiblybare, to_nick = stanza.attr.from, stanza.attr.to; 363 local from_jid_possiblybare, to_nick = stanza.attr.from, stanza.attr.to;
364 local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(.+)%z(.*)%z(.+)$"); 364 local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(%Z+)%z(%Z*)%z(.+)$");
365 local from_nick = room._jid_nick[from_jid]; 365 local from_nick = room._jid_nick[from_jid];
366 366
367 if not(from_nick) then return; end 367 if not(from_nick) then return; end
368 if not(from_jid_possiblybare == from_jid or from_jid_possiblybare == jid_bare(from_jid)) then return; end 368 if not(from_jid_possiblybare == from_jid or from_jid_possiblybare == jid_bare(from_jid)) then return; end
369 369