mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-01 17:53:00 +01:00
Enable flexible offline on disco#info as well
This commit is contained in:
parent
3ecd7e850c
commit
e95cf420a2
@ -341,9 +341,15 @@ get_sm_items(_Acc, #jid{luser = U, lserver = S, lresource = R} = JID,
|
|||||||
get_sm_items(Acc, _From, _To, _Node, _Lang) ->
|
get_sm_items(Acc, _From, _To, _Node, _Lang) ->
|
||||||
Acc.
|
Acc.
|
||||||
|
|
||||||
get_info(_Acc, #jid{luser = U, lserver = S}, #jid{luser = U, lserver = S},
|
get_info(_Acc, #jid{luser = U, lserver = S, lresource = R},
|
||||||
?NS_FLEX_OFFLINE, _Lang) ->
|
#jid{luser = U, lserver = S}, ?NS_FLEX_OFFLINE, _Lang) ->
|
||||||
N = jlib:integer_to_binary(count_offline_messages(U, S)),
|
N = jlib:integer_to_binary(count_offline_messages(U, S)),
|
||||||
|
case ejabberd_sm:get_session_pid(U, S, R) of
|
||||||
|
Pid when is_pid(Pid) ->
|
||||||
|
Pid ! dont_ask_offline;
|
||||||
|
none ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
[#xmlel{name = <<"x">>,
|
[#xmlel{name = <<"x">>,
|
||||||
attrs = [{<<"xmlns">>, ?NS_XDATA},
|
attrs = [{<<"xmlns">>, ?NS_XDATA},
|
||||||
{<<"type">>, <<"result">>}],
|
{<<"type">>, <<"result">>}],
|
||||||
|
Loading…
Reference in New Issue
Block a user