25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fill exmpp_xml known list with the nss/names/attrs used by this module.

SVN Revision: 1585
This commit is contained in:
Jean-Sébastien Pédron 2008-09-29 13:19:11 +00:00
parent 5f7e16eac3
commit ddcb94649d
2 changed files with 23 additions and 5 deletions

View File

@ -26,6 +26,9 @@
the XML parser options. This allows modules to extend the known
nss/names/attrs with their own data.
* src/mod_configure2.erl: Fill exmpp_xml known list with the
nss/names/attrs used by this module.
2008-09-25 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/jlib.erl (timestamp_to_xml): Create an #xmlel element, not an

View File

@ -37,11 +37,6 @@
-include("ejabberd.hrl").
% XXX The namespace used in this module isn't known by Exmpp: if the
% known list isn't updated by Ejabberd, some element names will be
% represented with strings.
% XXX This module currently supposed that they'll be atoms.
-define(NS_ECONFIGURE, 'http://ejabberd.jabberstudio.org/protocol/configure').
-define(NS_ECONFIGURE_s, "http://ejabberd.jabberstudio.org/protocol/configure").
@ -49,6 +44,26 @@ start(Host, Opts) ->
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_ECONFIGURE,
?MODULE, process_local_iq, IQDisc),
% Add nss/names/attrs used by this module to the known lists of Exmpp.
exmpp_xml:add_autoload_known_nss([?NS_ECONFIGURE]),
exmpp_xml:add_autoload_known_names([
'access',
'acls',
'body',
'info',
'jid',
'last',
'registration-watchers',
'subject',
'welcome-message'
]),
exmpp_xml:add_autoload_known_attrs([
'online-users',
'outgoing-s2s-servers',
'registered-users',
'running-nodes',
'stopped-nodes'
]),
ok.
stop(Host) ->