aboutsummaryrefslogtreecommitdiff
path: root/src/mod_mix.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-02-26 10:07:12 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-02-26 10:07:12 +0300
commitc1439ddd5bff82292919774c224a2bf3c8f63258 (patch)
treecc80ebe280ac56fcdfa9656f8f03a1938f53bdeb /src/mod_mix.erl
parentDon't pass empty resource to jid:make() (diff)
Get rid of jid:to_string/1 and jid:from_string/1
Diffstat (limited to 'src/mod_mix.erl')
-rw-r--r--src/mod_mix.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_mix.erl b/src/mod_mix.erl
index edacd7b91..940e9898f 100644
--- a/src/mod_mix.erl
+++ b/src/mod_mix.erl
@@ -261,7 +261,7 @@ publish_participant(From, To) ->
LFrom = jid:tolower(BareFrom),
LTo = jid:tolower(jid:remove_resource(To)),
Participant = #mix_participant{jid = BareFrom},
- ItemID = p1_sha:sha(jid:to_string(LFrom)),
+ ItemID = p1_sha:sha(jid:encode(LFrom)),
mod_pubsub:publish_item(
LTo, To#jid.lserver, ?NS_MIX_NODES_PARTICIPANTS,
From, ItemID, [xmpp:encode(Participant)]).
@@ -284,7 +284,7 @@ delete_presence(From, To) ->
delete_participant(From, To) ->
LFrom = jid:tolower(jid:remove_resource(From)),
- ItemID = p1_sha:sha(jid:to_string(LFrom)),
+ ItemID = p1_sha:sha(jid:encode(LFrom)),
delete_presence(From, To),
delete_item(From, To, ?NS_MIX_NODES_PARTICIPANTS, ItemID).