Foxed: Copy stanza type in reply for presence and message stanzas
authorWaqas Hussain <waqas20@gmail.com>
Tue, 4 Nov 2008 12:21:27 +0000 (17:21 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Tue, 4 Nov 2008 12:21:27 +0000 (17:21 +0500)
util/stanza.lua

index 3fa8ba662173daafad2ce84f3d22c8a4f011e7bf..52f372cc8efd27f505c1116398115ba8678019ef 100644 (file)
@@ -167,7 +167,7 @@ function iq(attr)
 end
 
 function reply(orig)
-       return stanza(orig.name, orig.attr and { to = orig.attr.from, from = orig.attr.to, id = orig.attr.id, type = ((orig.name == "iq" and "result") or nil) });
+       return stanza(orig.name, orig.attr and { to = orig.attr.from, from = orig.attr.to, id = orig.attr.id, type = ((orig.name == "iq" and "result") or orig.attr.type) });
 end
 
 function error_reply(orig, type, condition, message, clone)