From: Badlop Date: Mon, 14 May 2018 10:24:56 +0000 (+0200) Subject: Handle muc_register_nick success correctly (#2415) X-Git-Tag: 18.06~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb3bb710bd11ee721a044eecfbf5436d563bf449;p=ejabberd Handle muc_register_nick success correctly (#2415) --- diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 6b6c7d8ca..5a89dab4e 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -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).