mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
* src/mod_pubsub/mod_pubsub.erl: Announce PubSub features in the
server JID only if PEP is enabled (EJAB-905) SVN Revision: 2010
This commit is contained in:
parent
f4c88768da
commit
b326b7eb74
@ -1,5 +1,8 @@
|
||||
2009-04-08 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/mod_pubsub/mod_pubsub.erl: Announce PubSub features in the
|
||||
server JID only if PEP is enabled (EJAB-905)
|
||||
|
||||
* src/mod_muc/mod_muc.erl: English fixes (thanks to Glenn Sieb)
|
||||
* src/mod_muc/mod_muc_log.erl: Likewise
|
||||
* src/mod_muc/mod_muc_room.erl: Likewise
|
||||
|
@ -158,9 +158,6 @@ init([ServerHost, Opts]) ->
|
||||
Host = gen_mod:get_opt_host(ServerHost, Opts, "pubsub.@HOST@"),
|
||||
Access = gen_mod:get_opt(access_createnode, Opts, all),
|
||||
mod_disco:register_feature(ServerHost, ?NS_PUBSUB),
|
||||
ejabberd_hooks:add(disco_local_identity, ServerHost, ?MODULE, disco_local_identity, 75),
|
||||
ejabberd_hooks:add(disco_local_features, ServerHost, ?MODULE, disco_local_features, 75),
|
||||
ejabberd_hooks:add(disco_local_items, ServerHost, ?MODULE, disco_local_items, 75),
|
||||
ejabberd_hooks:add(disco_sm_identity, ServerHost, ?MODULE, disco_sm_identity, 75),
|
||||
ejabberd_hooks:add(disco_sm_features, ServerHost, ?MODULE, disco_sm_features, 75),
|
||||
ejabberd_hooks:add(disco_sm_items, ServerHost, ?MODULE, disco_sm_items, 75),
|
||||
@ -173,12 +170,25 @@ init([ServerHost, Opts]) ->
|
||||
gen_iq_handler:add_iq_handler(
|
||||
Mod, ServerHost, NS, ?MODULE, Fun, IQDisc)
|
||||
end,
|
||||
[{?NS_PUBSUB, ejabberd_local, iq_local},
|
||||
{?NS_PUBSUB_OWNER, ejabberd_local, iq_local},
|
||||
{?NS_PUBSUB, ejabberd_sm, iq_sm},
|
||||
[{?NS_PUBSUB, ejabberd_sm, iq_sm},
|
||||
{?NS_PUBSUB_OWNER, ejabberd_sm, iq_sm}]),
|
||||
ejabberd_router:register_route(Host),
|
||||
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
|
||||
case lists:member("pep", Plugins) of
|
||||
true ->
|
||||
ejabberd_hooks:add(disco_local_identity, ServerHost, ?MODULE, disco_local_identity, 75),
|
||||
ejabberd_hooks:add(disco_local_features, ServerHost, ?MODULE, disco_local_features, 75),
|
||||
ejabberd_hooks:add(disco_local_items, ServerHost, ?MODULE, disco_local_items, 75),
|
||||
lists:foreach(
|
||||
fun({NS,Mod,Fun}) ->
|
||||
gen_iq_handler:add_iq_handler(
|
||||
Mod, ServerHost, NS, ?MODULE, Fun, IQDisc)
|
||||
end,
|
||||
[{?NS_PUBSUB, ejabberd_local, iq_local},
|
||||
{?NS_PUBSUB_OWNER, ejabberd_local, iq_local}]);
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
update_database(Host),
|
||||
ets:new(gen_mod:get_module_proc(Host, pubsub_state), [set, named_table]),
|
||||
ets:insert(gen_mod:get_module_proc(Host, pubsub_state), {nodetree, NodeTree}),
|
||||
|
Loading…
Reference in New Issue
Block a user