25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Fix get_queue_length argument type

This commit is contained in:
Badlop 2011-05-27 11:23:44 +02:00
parent 82296c277a
commit 6c08c53d74
2 changed files with 3 additions and 5 deletions

View File

@ -693,11 +693,9 @@ user_queue_parse_query(US, Query) ->
us_to_list({User, Server}) ->
exmpp_jid:to_list(User, Server).
%% @spec (User::string(), Host::string()) -> integer()
%% @spec (User::binary(), Host::binary()) -> integer()
get_queue_length(User, Host) ->
UserB = list_to_binary(User),
HostB = list_to_binary(Host),
gen_storage:dirty_count_records(HostB, offline_msg, [{'=', user_host, {UserB, HostB}}]).
gen_storage:dirty_count_records(Host, offline_msg, [{'=', user_host, {User, Host}}]).
get_messages_subset(User, Host, MsgsAll) ->
Access = gen_mod:get_module_opt(Host, ?MODULE, access_max_user_messages,

View File

@ -1710,7 +1710,7 @@ list_given_users(Host, Users, Prefix, Lang, URLFunc) ->
get_offlinemsg_length(ModOffline, User, Server) ->
case ModOffline of
none -> "disabled";
_ -> pretty_string_int(ModOffline:get_queue_length(User, Server))
_ -> pretty_string_int(ModOffline:get_queue_length(list_to_binary(User), list_to_binary(Server)))
end.
get_offlinemsg_module(Server) ->