Emil Hesslow wrote:
On Tue, Aug 5, 2008 at 7:48 PM, Peter Saint-Andre <[EMAIL PROTECTED]> wrote:
Emil Hesslow wrote:
On Tue, Aug 5, 2008 at 7:32 PM, Peter Saint-Andre <[EMAIL PROTECTED]>
wrote:
Emil Hesslow wrote:
Hi,

I'm writing my own pubsub component and what I want to do is just to
push
messages to people that are online.

And when I look in XEP-0060 I found that there is a property called
presence_based_delivery but I can't understand how it suppose to work.
Right now I have to tell all subscribers that they either send a
presence
message to my pubsub component to tell that they are online or they have
to
allow a presences subscription that my component sends.

But I can't find any way in the protocol to tell users that they need to
do that. If a subscriber want he can subscribe to a node but because he
don't tell the pubsub component that he is online he will never get any
event messages.

What is the recommended way to do this?
I think you'd use subscription options:


http://www.xmpp.org/extensions/xep-0060.html#subscriber-subscribe-configure

http://www.xmpp.org/extensions/xep-0060.html#subscriber-configure

/psa

But subscription options is options the subscriber sets.

The pubsub#presence_based_delivery is a configuration option for the
node which tells if the node pushes events only to users that are
online or not. But I can't understand how the owner of the node knows
that. And I can't find any information about it.
Ah, I see what you're saying. You want a way to tell subscribers in-band
that they need to share presence with the node / pubsub service. In my
experience (e.g., with Mimir), the subscriber won't discover that in-band,
instead they will go to a website to register first, and part of the
instructions will be that a bot will send a presence subscription to the
user. That can be done in-band as well, naturally.

Peter


Ok, just wanted to know if there existed something in xep-0060 that I could use.

So if I want to do it in-band how would one do it? The only way I
could think of is the following:

Subscriber -> Server - Sends a subscription message
Server -> Subscriber - Send a presence subscription message
Subscriber -> Server - Answer the presence subscription message
Server -> Subscriber - Answer the subscription message.

But I have no idea if that is a good way or not.

Well I was thinking you'd deploy a bot (which might be the pubsub service itself) that walks someone through the process. So you add the bot to your roster (thus the pubsub service has your presence) and then "chat" with the bot to get everything worked out. Just normal presence subscription processes, which are familiar to end users. So basically what you outline above, yes.

Peter

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to