mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Mark get_queue_length obsolete, and use count_offline_messages (#970)
This commit is contained in:
parent
44978ce978
commit
9c3d57e63e
@ -1520,8 +1520,7 @@ get_offlinemsg_length(ModOffline, User, Server) ->
|
||||
case ModOffline of
|
||||
none -> <<"disabled">>;
|
||||
_ ->
|
||||
pretty_string_int(ModOffline:get_queue_length(User,
|
||||
Server))
|
||||
pretty_string_int(ModOffline:count_offline_messages(User,Server))
|
||||
end.
|
||||
|
||||
get_offlinemsg_module(Server) ->
|
||||
|
@ -531,7 +531,7 @@ get_commands_spec() ->
|
||||
tags = [offline],
|
||||
desc = "Get the number of unread offline messages",
|
||||
policy = user,
|
||||
module = mod_offline, function = get_queue_length,
|
||||
module = mod_offline, function = count_offline_messages,
|
||||
args = [],
|
||||
result = {res, integer}},
|
||||
#ejabberd_commands{name = send_message, tags = [stanza],
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
-behaviour(gen_mod).
|
||||
|
||||
-export([count_offline_messages/2]).
|
||||
|
||||
-export([start/2,
|
||||
start_link/2,
|
||||
stop/1,
|
||||
@ -61,6 +59,7 @@
|
||||
import/3,
|
||||
export/1,
|
||||
get_queue_length/2,
|
||||
count_offline_messages/2,
|
||||
get_offline_els/2,
|
||||
webadmin_page/3,
|
||||
webadmin_user/4,
|
||||
@ -70,6 +69,8 @@
|
||||
handle_info/2, terminate/2, code_change/3,
|
||||
mod_opt_type/1]).
|
||||
|
||||
-deprecated({get_queue_length,2}).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("logger.hrl").
|
||||
|
||||
@ -1294,7 +1295,7 @@ get_messages_subset2(Max, Length, MsgsAll, odbc) ->
|
||||
MsgsFirstN ++ [IntermediateMsg] ++ MsgsLastN.
|
||||
|
||||
webadmin_user(Acc, User, Server, Lang) ->
|
||||
QueueLen = get_queue_length(jid:nodeprep(User),
|
||||
QueueLen = count_offline_messages(jid:nodeprep(User),
|
||||
jid:nameprep(Server)),
|
||||
FQueueLen = [?AC(<<"queue/">>,
|
||||
(iolist_to_binary(integer_to_list(QueueLen))))],
|
||||
|
Loading…
Reference in New Issue
Block a user