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

pubsub/pep: get_node_affiliations resultset bugfix

SVN Revision: 1684
This commit is contained in:
Christophe Romain 2008-11-25 23:05:26 +00:00
parent 11e5617efc
commit e68a731219
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-24 Evgeniy Khramtsov <ekhramtsov@process-one.net>
* src/eldap/Makefile.in: added +optimize and +driver

View File

@ -170,14 +170,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)),