Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickael Remond <mremond@process-one.net>2016-02-03 21:03:17 +0300
committerMickael Remond <mremond@process-one.net>2016-02-03 21:03:17 +0300
commitdfc29ea03ca91e1eb5387d93612e2ac4b4b496da (patch)
tree8a3ab89a7307fb5f4daf9f66b00fe9f16fa36b69 /src/mod_carboncopy.erl
parent5539db37b6a6a38a88aa0d69b19c88d25d6b4850 (diff)
Switch to Fast XML module
Diffstat (limited to 'src/mod_carboncopy.erl')
-rw-r--r--src/mod_carboncopy.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mod_carboncopy.erl b/src/mod_carboncopy.erl
index a4ca45ddf..81cf78a9d 100644
--- a/src/mod_carboncopy.erl
+++ b/src/mod_carboncopy.erl
@@ -55,9 +55,9 @@ is_carbon_copy(Packet) ->
is_carbon_copy(Packet, <<"received">>).
is_carbon_copy(Packet, Direction) ->
- case xml:get_subtag(Packet, Direction) of
+ case fxml:get_subtag(Packet, Direction) of
#xmlel{name = Direction, attrs = Attrs} ->
- case xml:get_attr_s(<<"xmlns">>, Attrs) of
+ case fxml:get_attr_s(<<"xmlns">>, Attrs) of
?NS_CARBONS_2 -> true;
?NS_CARBONS_1 -> true;
_ -> false
@@ -137,8 +137,8 @@ user_receive_packet(Packet, _C2SState, JID, _From, To) ->
% - we also replicate "read" notifications
check_and_forward(JID, To, Packet, Direction)->
case is_chat_message(Packet) andalso
- xml:get_subtag(Packet, <<"private">>) == false andalso
- xml:get_subtag(Packet, <<"no-copy">>) == false of
+ fxml:get_subtag(Packet, <<"private">>) == false andalso
+ fxml:get_subtag(Packet, <<"no-copy">>) == false of
true ->
case is_carbon_copy(Packet) of
false ->
@@ -268,7 +268,7 @@ complete_packet(_From, #xmlel{name = <<"message">>, attrs=OrigAttrs} = Packet, r
Packet#xmlel{attrs = Attrs}.
message_type(#xmlel{attrs = Attrs}) ->
- case xml:get_attr(<<"type">>, Attrs) of
+ case fxml:get_attr(<<"type">>, Attrs) of
{value, Type} -> Type;
false -> <<"normal">>
end.
@@ -282,7 +282,7 @@ is_chat_message(#xmlel{name = <<"message">>} = Packet) ->
is_chat_message(_Packet) -> false.
has_non_empty_body(Packet) ->
- xml:get_subtag_cdata(Packet, <<"body">>) =/= <<"">>.
+ fxml:get_subtag_cdata(Packet, <<"body">>) =/= <<"">>.
%% list {resource, cc_version} with carbons enabled for given user and host
list(User, Server) ->