diff options
Diffstat (limited to '')
-rw-r--r-- | src/mod_mix.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mod_mix.erl b/src/mod_mix.erl index 6ac2bd60..256715af 100644 --- a/src/mod_mix.erl +++ b/src/mod_mix.erl @@ -424,6 +424,7 @@ process_mix_join(#iq{to = To, from = From, notify_participant_joined(Mod, ServerHost, To, From, ID, Nick), xmpp:make_iq_result(IQ, #mix_join{id = ID, subscribe = Nodes, + jid = make_channel_id(To, ID), nick = Nick, xmlns = XmlNs}) catch _:{badmatch, {error, db_failure}} -> @@ -646,6 +647,11 @@ make_id(JID, Key) -> Data = jid:encode(jid:tolower(jid:remove_resource(JID))), xmpp_util:hex(misc:crypto_hmac(sha256, Data, Key, 10)). +-spec make_channel_id(jid(), binary()) -> jid(). +make_channel_id(JID, ID) -> + {U, S, R} = jid:split(JID), + jid:make(<<ID/binary, $#, U/binary>>, S, R). + %%%=================================================================== %%% Error generators %%%=================================================================== |