X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=modules%2Ferl%2Feuphorik_protocole.erl;h=c2cb9846b537865c4faec2cd79644060b46a5af4;hp=154c7d41c8fd279758763fb580ebc7e00a495ae5;hb=2faefc542de20cfcc0220b5c7fd7982dd0fbbfd4;hpb=7f8025543a7a5d614ec47d18026dc0feb3338fdb diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index 154c7d4..c2cb984 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -45,7 +45,10 @@ loginUser({ok, User}) -> euphorik_minichat:update_date_derniere_connexion(User#user.id), json_reponse_login_ok(User); loginUser(_) -> - erreur("Erreur login"). + % ajoute un délais d'attente (TODO : un autre moyen plus élégant ?) + receive after 1000 -> + erreur("Erreur login") + end. % Renvoie un string() représentant un cookie en base 36. Il y a 10^32 possibillités. @@ -69,6 +72,7 @@ profile( {nick, Pseudo}, {email, Email}, {css, Css}, + {nick_format, Nick_format_str}, {main_page, Main_page}, {conversations, {array, Conversations_json}} ] @@ -86,7 +90,7 @@ profile( [], Conversations_json ), - case euphorik_minichat:set_profile(Cookie, Login, Password, Pseudo, Email, Css, Main_page, Conversations) of + case euphorik_minichat:set_profile(Cookie, Login, Password, Pseudo, Email, Css, list_to_atom(Nick_format_str), Main_page, Conversations) of ok -> json_reponse_ok(); login_deja_pris -> @@ -245,6 +249,7 @@ json_reponse_login_ok(User) -> {login, User#user.login}, {email, User#user.email}, {css, User#user.css}, + {nick_format, atom_to_list(User#user.nick_format)}, {main_page, User#user.page_principale}, {conversations, {array,