X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;ds=sidebyside;f=modules%2Ferl%2Feuphorik_protocole.erl;h=35bf9933b3603b8aff8ea93a7c5eb05d356a25d8;hb=cded85bdaf899cef1ba38d2ee6fd24c67f2abc52;hp=2f4a5a3593faf37dde69aa48f6999d780461fa74;hpb=5527b650d1cb16caa6afc8f44545097ca92b97a2;p=euphorik.git diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index 2f4a5a3..35bf993 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -8,8 +8,8 @@ -module(euphorik_protocole). -export([ - generation_captcha/1, - nouveau_user_captcha/1, + %generation_captcha/1, Obsolète + %nouveau_user_captcha/1, Obsolète nouveau_user_login/1, login/1, logout/1, @@ -112,6 +112,12 @@ profile(Action) -> Pseudo = case xmerl_xpath:string("pseudo", Action) of [#xmlElement{content = [#xmlText{value = P2}]}] -> P2; _ -> Login end, Email = case xmerl_xpath:string("email", Action) of [#xmlElement{content = [#xmlText{value = E}]}] -> E; _ -> undefined end, Css = case xmerl_xpath:string("css", Action) of [#xmlElement{content = [#xmlText{value = C}]}] -> C; _ -> undefined end, + Conversations = case xmerl_xpath:string("conversations", Action) of + Conversations -> + % extraction de chaque conversation + + _ -> [] + end, case euphorik_minichat:set_profile(Cookie, Login, Password, Pseudo, Email, Css) of ok -> xml_reponse_profile_ok(); @@ -159,9 +165,7 @@ refreshMessage(Action) -> {erlang:list_to_integer(Id_racine_str, 36), erlang:list_to_integer(Page_conv_str)} end, xmerl_xpath:string("conversation", Action) - ), - Poulpe = euphorik_minichat_conversation:conversations(Conversations, Nb_message, Dernier_id, Page), - io:format("Poulpe = ~p~n", [Poulpe]), + ), % accrochez-vous ca va siouxer ;) [{reponse, [{name, "refreshMessages"}], lists:map( @@ -198,8 +202,8 @@ refreshMessage(Action) -> ) ] } - end, - Poulpe + end, + euphorik_minichat_conversation:conversations(Conversations, Nb_message, Dernier_id, Page) ) }]; _ -> @@ -281,7 +285,6 @@ format_date(Date) -> %%%%%%%%% %%%%%%%%% simple_xml_to_string(XML) -> - io:format("~p~n", [XML]), lists:flatten(xmerl:export_simple(XML, xmerl_xml, [{prolog, ["\n"]}])).