0

In XMPP pubsub is it possible for a subscriber to retrieve the Subscriptions List or combine the pubsub service with a MUC, so that a subscriber could see people online (like in the MUC)?

Is it only the owner who can retrieve the subscriptions list? could he somehow make it public to all the people in the pubsub?

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
user1054134
  • 443
  • 1
  • 4
  • 21

2 Answers2

1

While it's not specified in XEP-0060 that non-owners should be able to access the subscriber list, I'd say it's perfectly reasonable for a given pubsub service implementation to allow you to override access control rules.

Unfortunately I don't know Openfire enough to know whether this is possible there.

Update: On re-reading your question I realise you might be trying to use a pubsub node as a pseudo-MUC room. The problem with this is that you will not receive notification when the subscriber list changes (i.e. someone joining or leaving). You will also not be able to add extended information the same way you can with normal presence stanzas.

For this reason I don't recommend this approach (given the little I know of what you are trying to do).

MattJ
  • 7,924
  • 1
  • 28
  • 33
  • I'm trying to build different groups where it is also possible to chat. The groups will be different pubsub nodes and I want to connect each pubsub node with a MUC room so that people can see who is online and can chat with each other. On the other hand in the pubsub node different discussions will take place and should be stored. The MUC and the pubsub node should then be created at the same time (and maybe with the same name) and when a subscriber wants to retrieve the posts in the pubsub there will also be a link to the corresponding MUC chat .. (please see next comment) – user1054134 May 16 '12 at 10:28
  • where at least the online users will be available for chat. But it will still not be possible to retrieve the complete subscription list. Or do you have an idea how to tweak it somehow to store the users as they subscribe somewhere in the description of the pubsub or a MUC since there will be only one type of xmpp clients, so it should not be compatible with different xmpp clients.. – user1054134 May 16 '12 at 10:28
  • It sounds like ideally you just want the pubsub service to grant access to anyone in the MUC room with the same name as the node. The pubsub node will be used for something other than chatting, right? – MattJ May 16 '12 at 11:13
  • yes, people who are subscribed to the pubsub can post messages and discuss stuff while there will be a MUC where the subscribed users could also discuss in real-time. Actually it would be manageable with MUC only BUT with MUC no notifications of new posts will be possible unless when the user goes online he will be joining all MUCs he is interested in automatically and will get new messages. It would also drain battery (it's a mobile app) with all presence stanzas from all the MUCs right or doesn't it matter because the connection is established? (traffic is not that important in this case) – user1054134 May 16 '12 at 11:26
  • Well, basically I need a collection node (discussion group with a specific topic) with "threads" (each question is a pubsub subnode of the collection node to group each question). In this collection node I want to get all the subscribers (and maybe put a MUC if getting all the subscribers is not possible). – user1054134 May 16 '12 at 16:34
  • Regarding your concerns about battery life, an established connection does not drain battery, but transferring data does. A noisy MUC would certainly generate a lot of presence. But then so would polling the subscriber list - so you need to balance both options according to your goals. – MattJ May 16 '12 at 21:57
  • Thanks, this helps a lot! I would really appreciate it if you could take a look at the related question http://stackoverflow.com/questions/10650543/create-forum-with-xmpp-pubsub ? – user1054134 May 18 '12 at 18:58
  • How did you end up solving this? I'm stuck in a similar place. Im making an app that works like iMessanger so I need the rooms to stay subscribed and I also need to be able to list users in chatroom. – Andres Canella Mar 02 '13 at 04:32
1

You could write a plugin that made every subscriber an owner (add the affiliation) and removed that affiliation when they unsubscribe.

Otherwise you could of course create a custom version of openfire with the access rules changed.

Robin
  • 24,062
  • 5
  • 49
  • 58