summaryrefslogtreecommitdiff
path: root/src/jlib.erl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/jlib.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jlib.erl b/src/jlib.erl
index a829b327..aa5e3e62 100644
--- a/src/jlib.erl
+++ b/src/jlib.erl
@@ -12,6 +12,7 @@
-export([make_result_iq_reply/1,
make_error_reply/3,
+ make_error_element/2,
make_correct_from_to_attrs/3,
replace_from_to_attrs/3,
replace_from_to/3,
@@ -81,6 +82,11 @@ make_error_reply_attrs(Attrs) ->
Attrs6 = [{"type", "error"} | Attrs5],
Attrs6.
+make_error_element(Code, Desc) ->
+ {xmlelement, "error",
+ [{"code", Code}],
+ [{xmlcdata, Desc}]}.
+
make_correct_from_to_attrs(From, To, Attrs) ->
Attrs1 = lists:keydelete("from", 1, Attrs),
Attrs2 = case xml:get_attr("to", Attrs) of