]> granicus.if.org Git - ejabberd/commitdiff
Handle muc_register_nick success correctly (#2415)
authorBadlop <badlop@process-one.net>
Mon, 14 May 2018 10:24:56 +0000 (12:24 +0200)
committerBadlop <badlop@process-one.net>
Mon, 14 May 2018 10:24:56 +0000 (12:24 +0200)
src/mod_muc_admin.erl

index 6b6c7d8ca268146b0f1ac1d127b40b25f1b92dc4..5a89dab4e2d60069535f5f77b8560de8a353ac39 100644 (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).