diff options
author | Badlop <badlop@process-one.net> | 2011-07-28 16:58:58 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-07-28 16:58:58 +0200 |
commit | aa8c9bf0a5419476240c9145b2770f1010c7ecae (patch) | |
tree | dd98119a45f8862e596bb159398db55bc1d8327e /src | |
parent | Return #roster elements in the expected format (diff) |
Name and groups must be binaries, not strings
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_roster.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 7dc9e54fd..68d1c413f 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -384,7 +384,7 @@ storageroster_to_roster(#rosteritem{user_host_jid = {U, S, JID} = USJ, fun(#rostergroup{user_host_jid = USJ1, grp = G}, R) when USJ =:= USJ1 -> %% G is a string when using odbc beckend, and a binary when using mnesia - GString = convert_to_string(G), + GString = convert_to_binary(G), [GString | R]; (_, R) -> R @@ -392,14 +392,14 @@ storageroster_to_roster(#rosteritem{user_host_jid = {U, S, JID} = USJ, #roster{usj = {U, S, JID}, us = US, jid = JID, - name = convert_to_string(Name), + name = convert_to_binary(Name), subscription = Subscription, ask = Ask, askmessage = AskMessage, groups = Groups}. -convert_to_string(A) when is_binary(A) -> binary_to_list(A); -convert_to_string(A) when is_list(A) -> A. +convert_to_binary(A) when is_list(A) -> list_to_binary(A); +convert_to_binary(A) when is_binary(A) -> A. %% @spec (Item) -> XML %% Item = rosteritem() |