summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-07-07 16:42:41 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-07-08 15:07:26 +0300
commit661b041302f4e29c5c5607523c96fedb5ecc8ccf (patch)
treef43ed3649d36fc7f1158d5889ee03396a9e6147b
parentHandle MUC/Sub subscriptions list request (diff)
Rename MUC/Sub's namespace
-rw-r--r--include/ns.hrl2
-rw-r--r--src/mod_muc_room.erl10
2 files changed, 6 insertions, 6 deletions
diff --git a/include/ns.hrl b/include/ns.hrl
index 4fcf03dd..a150746e 100644
--- a/include/ns.hrl
+++ b/include/ns.hrl
@@ -165,7 +165,7 @@
-define(NS_MIX_NODES_SUBJECT, <<"urn:xmpp:mix:nodes:subject">>).
-define(NS_MIX_NODES_CONFIG, <<"urn:xmpp:mix:nodes:config">>).
-define(NS_MUCSUB, <<"urn:xmpp:mucsub:0">>).
--define(NS_MUCSUB_NODES_PRESENCES, <<"urn:xmpp:mucsub:nodes:presences">>).
+-define(NS_MUCSUB_NODES_PRESENCE, <<"urn:xmpp:mucsub:nodes:presence">>).
-define(NS_MUCSUB_NODES_MESSAGES, <<"urn:xmpp:mucsub:nodes:messages">>).
-define(NS_MUCSUB_NODES_PARTICIPANTS, <<"urn:xmpp:mucsub:nodes:participants">>).
-define(NS_MUCSUB_NODES_AFFILIATIONS, <<"urn:xmpp:mucsub:nodes:affiliations">>).
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl
index 373ae3a6..dd29156b 100644
--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -2367,7 +2367,7 @@ send_new_presence1(NJID, Reason, IsInitialPresence, StateData, OldStateData) ->
| StatusEls]}]),
Node1 = case is_ra_changed(NJID, IsInitialPresence, StateData, OldStateData) of
true -> ?NS_MUCSUB_NODES_AFFILIATIONS;
- false -> ?NS_MUCSUB_NODES_PRESENCES
+ false -> ?NS_MUCSUB_NODES_PRESENCE
end,
send_wrapped(jid:replace_resource(StateData#state.jid, Nick),
Info#user.jid, Packet, Node1, StateData),
@@ -2445,7 +2445,7 @@ send_existing_presences1(ToJID, StateData) ->
=
[]}]}]),
send_wrapped(jid:replace_resource(StateData#state.jid, FromNick),
- RealToJID, Packet, ?NS_MUCSUB_NODES_PRESENCES, StateData)
+ RealToJID, Packet, ?NS_MUCSUB_NODES_PRESENCE, StateData)
end
end,
(?DICT):to_list(StateData#state.nicks)).
@@ -2581,7 +2581,7 @@ send_nick_changing(JID, OldNick, StateData,
send_wrapped(jid:replace_resource(StateData#state.jid,
OldNick),
Info#user.jid, Packet1,
- ?NS_MUCSUB_NODES_PRESENCES,
+ ?NS_MUCSUB_NODES_PRESENCE,
StateData);
true -> ok
end,
@@ -2589,7 +2589,7 @@ send_nick_changing(JID, OldNick, StateData,
send_wrapped(jid:replace_resource(StateData#state.jid,
Nick),
Info#user.jid, Packet2,
- ?NS_MUCSUB_NODES_PRESENCES,
+ ?NS_MUCSUB_NODES_PRESENCE,
StateData);
true -> ok
end;
@@ -4642,7 +4642,7 @@ get_subscription_nodes(#xmlel{name = <<"iq">>} = Packet) ->
lists:flatmap(
fun(#xmlel{name = <<"event">>, attrs = Attrs}) ->
Node = fxml:get_attr_s(<<"node">>, Attrs),
- case lists:member(Node, [?NS_MUCSUB_NODES_PRESENCES,
+ case lists:member(Node, [?NS_MUCSUB_NODES_PRESENCE,
?NS_MUCSUB_NODES_MESSAGES,
?NS_MUCSUB_NODES_AFFILIATIONS,
?NS_MUCSUB_NODES_SUBJECT,