mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix get_queue_length argument type
This commit is contained in:
parent
82296c277a
commit
6c08c53d74
@ -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,
|
||||
|
@ -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) ->
|
||||
|
Loading…
Reference in New Issue
Block a user