24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

pubsub/pep: get_node_affiliations resultset bugfix

SVN Revision: 1683
This commit is contained in:
Christophe Romain 2008-11-25 23:04:22 +00:00
parent ba258b0a3e
commit 8ef0fe6b56
2 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2008-10-17 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/node_pep.erl: Fix get_node_affiliations resultset to
owner (Thanks to Michal Schmidt)
2008-11-12 Badlop <badlop@process-one.net>
* doc/guide.tex: Improve legibility of mod_irc example config

View File

@ -168,14 +168,9 @@ get_entity_affiliations(_Host, Owner) ->
OwnerKey = jlib:jid_tolower(jlib:jid_remove_resource(Owner)),
node_default:get_entity_affiliations(OwnerKey, Owner).
get_node_affiliations(_Host, Node) ->
States = mnesia:match_object(
#pubsub_state{stateid = {'_', {'_', Node}},
_ = '_'}),
Tr = fun(#pubsub_state{stateid = {J, {_, _}}, affiliation = A}) ->
{J, A}
end,
{result, lists:map(Tr, States)}.
get_node_affiliations(Host, Node) ->
OwnerKey = jlib:jid_remove_resource(Host),
node_default:get_node_affiliations(OwnerKey, Node).
get_affiliation(_Host, Node, Owner) ->
OwnerKey = jlib:jid_tolower(jlib:jid_remove_resource(Owner)),