Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 5078:cba0b426b542
MUC: Fix private IQ results and errors for non-vcard queries.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sat, 04 Aug 2012 23:22:16 +0500 |
| parents | 4bc202a7b351 |
| children | 1ef9aa0c9fb0 |
comparison
equal
deleted
inserted
replaced
| 5077:6c2c8bf36d22 | 5078:cba0b426b542 |
|---|---|
| 539 local o_data = self._occupants[to]; | 539 local o_data = self._occupants[to]; |
| 540 if o_data then | 540 if o_data then |
| 541 log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); | 541 log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); |
| 542 if stanza.name == "iq" then | 542 if stanza.name == "iq" then |
| 543 local id = stanza.attr.id; | 543 local id = stanza.attr.id; |
| 544 stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza); | 544 if stanza.attr.type == "get" or stanza.attr.type == "set" then |
| 545 stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza); | |
| 546 else | |
| 547 stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza); | |
| 548 end | |
| 545 if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then | 549 if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then |
| 546 stanza.attr.to = jid_bare(stanza.attr.to); | 550 stanza.attr.to = jid_bare(stanza.attr.to); |
| 547 end | 551 end |
| 548 self:_route_stanza(stanza); | 552 self:_route_stanza(stanza); |
| 549 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id; | 553 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id; |
