[JDEV] Re: How should a component auto-populate a roster and force a subscription?
Mike Prince
mike at mikeprince.com
Wed Nov 20 11:20:44 CST 2002
Raditha,
Thanks for the pointers. The solution I've arrived at is to update the
Jabber XML database with the new roster information, and then push the
same roster information to the client with an iq set. It appears to
work ;)
I'm under the impression the client takes the baton from there and
negotiates presence.
Thanks again for your help,
Mike
> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On
> Behalf Of Raditha Dissanayake
> Sent: Tuesday, November 19, 2002 11:07 PM
> To: jdev at jabber.org
> Subject: [JDEV] Re: How should a component auto-populate a
> roster and force a subscription?
>
>
> Hi,
>
> The jabber programmers guide at docs.jabber.org might be the
> document you
> are looking for. It's also worthwhile to study the xml that
> is sent back and
> forth between the client and the server to get a good
> understanding of
> what's happening.
>
> Having said all that i think you are on the right track
> regards the presence
> packets. however i don't think most client will like it if
> you push iq set
> packets to them. You might be better off sending presence
> subsribe packets
> to both clients (yours and your buddy's).
>
> hope this helps.
>
>
> Mike Prince writes:
>
> > I'm writing a component that will auto-populate a roster and
> > auto-subscribe the contacts.
> >
> > My current tact is to use <xdb> to update the clients roster in the
> > database, then push the roster change to the client via an <iq
> > type="set"><query...
> >
> > I'd then like force the subscriptions (as much as possible)
> by forging
> > the <presence> packet to the remote contact.
> >
> > Am I going in the right direction?
> >
> > As it stands, I'm crashing JIM with the <iq> set above and
> am swimming
> > around and not finding any documentation about the above in
> regards to
> > components. I'm basing my guesstimates on client2server
> interactions.
> >
> > Are there any docs around (even in pre-alpha form) that could
> > enlighten me? What's the "right" way to do this?
> >
> > Thanks,
> >
> > Mike
More information about the JDev
mailing list