mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Advertise privacy lists support via disco#info
This commit is contained in:
parent
7865c6a146
commit
0baf4e6088
@ -64,6 +64,7 @@ start(Host, Opts) ->
|
||||
update_table();
|
||||
_ -> ok
|
||||
end,
|
||||
mod_disco:register_feature(Host, ?NS_PRIVACY),
|
||||
ejabberd_hooks:add(privacy_iq_get, Host, ?MODULE,
|
||||
process_iq_get, 50),
|
||||
ejabberd_hooks:add(privacy_iq_set, Host, ?MODULE,
|
||||
@ -80,6 +81,7 @@ start(Host, Opts) ->
|
||||
?NS_PRIVACY, ?MODULE, process_iq, IQDisc).
|
||||
|
||||
stop(Host) ->
|
||||
mod_disco:unregister_feature(Host, ?NS_PRIVACY),
|
||||
ejabberd_hooks:delete(privacy_iq_get, Host, ?MODULE,
|
||||
process_iq_get, 50),
|
||||
ejabberd_hooks:delete(privacy_iq_set, Host, ?MODULE,
|
||||
|
@ -356,13 +356,7 @@ last(Config) ->
|
||||
disconnect(Config).
|
||||
|
||||
privacy(Config) ->
|
||||
%% BUG: the feature MUST be advertised via disco#info:
|
||||
%% http://xmpp.org/extensions/xep-0016.html#disco
|
||||
%% It seems like this bug exists because Privacy Lists
|
||||
%% were implemented according to the old RFC where support
|
||||
%% needn't be advertised via service discovery.
|
||||
%% TODO: fix in ejabberd
|
||||
%% true = is_feature_advertised(Config, ?NS_PRIVACY),
|
||||
true = is_feature_advertised(Config, ?NS_PRIVACY),
|
||||
I1 = send(Config, #iq{type = get, sub_els = [#privacy{}]}),
|
||||
#iq{type = result, id = I1, sub_els = [#privacy{}]} = recv(),
|
||||
JID = <<"tybalt@example.com">>,
|
||||
|
Loading…
Reference in New Issue
Block a user