summaryrefslogtreecommitdiff
path: root/src/jlib.erl
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2002-12-17 20:49:45 +0000
committerAlexey Shchepin <alexey@process-one.net>2002-12-17 20:49:45 +0000
commit00a923b14ac2282f3ba09e51079daa3220bb7598 (patch)
tree30021b9150769ff360b2de22b19a1a31102a1faf /src/jlib.erl
parent*** empty log message *** (diff)
*** empty log message ***
SVN Revision: 18
Diffstat (limited to 'src/jlib.erl')
-rw-r--r--src/jlib.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jlib.erl b/src/jlib.erl
index aa5e3e62..62910a12 100644
--- a/src/jlib.erl
+++ b/src/jlib.erl
@@ -199,13 +199,20 @@ iq_query_info({xmlelement, Name, Attrs, Els}) when Name == "iq" ->
Type1 = case Type of
"set" -> set;
"get" -> get;
+ "result" -> reply;
+ "error" -> reply;
_ -> invalid
end,
if
- (Type1 /= invalid) and (XMLNS /= "") ->
+ (Type1 /= invalid) and (Type1 /= reply) and (XMLNS /= "") ->
{iq, ID, Type1, XMLNS, {xmlelement, Name2, Attrs2, Els2}};
true ->
- invalid
+ if
+ Type1 == reply ->
+ reply;
+ true ->
+ invalid
+ end
end;
_ ->
invalid