+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
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)),