25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Handle muc_register_nick success correctly (#2415)

This commit is contained in:
Badlop 2018-05-14 12:24:56 +02:00
parent c30715e67b
commit cb3bb710bd

View File

@ -368,7 +368,10 @@ muc_register_nick(Nick, FromBinary, ServerHost) ->
Host = find_host(ServerHost),
From = jid:decode(FromBinary),
Lang = <<"en">>,
mod_muc:iq_set_register_info(ServerHost, Host, From, Nick, Lang).
case mod_muc:iq_set_register_info(ServerHost, Host, From, Nick, Lang) of
{result, undefined} -> ok;
E -> E
end.
muc_unregister_nick(FromBinary, ServerHost) ->
muc_register_nick(<<"">>, FromBinary, ServerHost).