diff --git a/apps/roster/src/rest/rest_chat_csv.erl b/apps/roster/src/rest/rest_chat_csv.erl index 4109eb02101aaa2d104a4bc0d14d3bd56d48a481..5bcdcdd4258ddbb1fa2d783095ee37a34e1d495d 100644 --- a/apps/roster/src/rest/rest_chat_csv.erl +++ b/apps/roster/src/rest/rest_chat_csv.erl @@ -90,8 +90,8 @@ send_response(CsvText, Filename, Req) -> Req:respond({ResponseStatus, ResponseHeader, ResponseData}). -spec parse_incomming_data(list(tuple())) -> {ok, term()} | {error, wrong_data}. -parse_incomming_data([{"from", FromPhoneId}, {"to", ToPhoneId}]) -> {ok, {list_to_binary(FromPhoneId), list_to_binary(ToPhoneId)}}; -parse_incomming_data([{"muc", RoomId}]) -> {ok, list_to_binary(RoomId)}; +parse_incomming_data([{<<"from">>, FromPhoneId}, {<<"to">>, ToPhoneId}]) -> {ok, {FromPhoneId, ToPhoneId}}; +parse_incomming_data([{<<"muc">>, RoomId}]) -> {ok, RoomId}; parse_incomming_data(_) -> {error, wrong_data}. -spec conversation_to_csv(ChatHistory::type_chat_history(), Members::list(type_user_data()), CsvColumnsData::string()) -> string().