25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-02 16:37:52 +01:00

don't ask capabilities to MUC room participants

SVN Revision: 1147
This commit is contained in:
Christophe Romain 2008-01-11 13:57:29 +00:00
parent c49a6e7176
commit ac31008ee0
2 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2008-01-11 Christophe Romain <christophe.romain@process-one.net>
* src/mod_caps.erl: don't ask capabilities to MUC room participants
(EJAB-478)
2008-01-10 Christophe Romain <christophe.romain@process-one.net> 2008-01-10 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/nodetree_default: Force PEP parent node to be [] * src/mod_pubsub/nodetree_default: Force PEP parent node to be []

View File

@ -64,20 +64,29 @@
%% <presence/> stanza) and returns an opaque value representing the %% <presence/> stanza) and returns an opaque value representing the
%% Entity Capabilities contained therein, or the atom nothing if no %% Entity Capabilities contained therein, or the atom nothing if no
%% capabilities are advertised. %% capabilities are advertised.
read_caps([{xmlelement, "c", Attrs, _Els} | Tail]) -> read_caps(Els) ->
read_caps(Els, nothing).
read_caps([{xmlelement, "c", Attrs, _Els} | Tail], Result) ->
case xml:get_attr_s("xmlns", Attrs) of case xml:get_attr_s("xmlns", Attrs) of
?NS_CAPS -> ?NS_CAPS ->
Node = xml:get_attr_s("node", Attrs), Node = xml:get_attr_s("node", Attrs),
Version = xml:get_attr_s("ver", Attrs), Version = xml:get_attr_s("ver", Attrs),
Exts = string:tokens(xml:get_attr_s("ext", Attrs), " "), Exts = string:tokens(xml:get_attr_s("ext", Attrs), " "),
#caps{node = Node, version = Version, exts = Exts}; read_caps(Tail, #caps{node = Node, version = Version, exts = Exts});
_ -> _ ->
read_caps(Tail) read_caps(Tail, Result)
end; end;
read_caps([_ | Tail]) -> read_caps([{xmlelement, "x", Attrs, _Els} | Tail], Result) ->
read_caps(Tail); case xml:get_attr_s("xmlns", Attrs) of
read_caps([]) -> ?NS_MUC_USER ->
nothing. nothing;
_ ->
read_caps(Tail, Result)
end;
read_caps([_ | Tail], Result) ->
read_caps(Tail, Result);
read_caps([], Result) ->
Result.
%% note_caps should be called to make the module request disco %% note_caps should be called to make the module request disco
%% information. Host is the host that asks, From is the full JID that %% information. Host is the host that asks, From is the full JID that