diff options
author | Badlop <badlop@process-one.net> | 2009-07-27 09:36:49 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2009-07-27 09:36:49 +0000 |
commit | 1262b0e35303069863dc6038b04d1a203c4ed162 (patch) | |
tree | 0ce1a53c321d447376537552a6650980eb405ea8 | |
parent | fix subscribers publish_model (diff) |
Fix error when nick registration stanza doesn't contain Value.
SVN Revision: 2394
-rw-r--r-- | src/mod_muc/mod_muc.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_muc/mod_muc.erl b/src/mod_muc/mod_muc.erl index 69f1983fb..22e8bb6e0 100644 --- a/src/mod_muc/mod_muc.erl +++ b/src/mod_muc/mod_muc.erl @@ -742,11 +742,11 @@ process_iq_register_set(Host, From, SubEl, Lang) -> {error, ?ERR_BAD_REQUEST}; _ -> case lists:keysearch("nick", 1, XData) of - false -> + {value, {_, [Nick]}} when Nick /= "" -> + iq_set_register_info(Host, From, Nick, Lang); + _ -> ErrText = "You must fill in field \"Nickname\" in the form", - {error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)}; - {value, {_, [Nick]}} -> - iq_set_register_info(Host, From, Nick, Lang) + {error, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)} end end; _ -> |