[JDEV] setting a user's vcard from within a component

Stefan Strigler steve at zeank.in-berlin.de
Tue Nov 18 10:19:51 CST 2003


Am Die, 2003-11-18 um 16.44 schrieb Peter Millard:
> Stefan Strigler wrote:
> > I'm trying to develop a module for the wcs component which should enable
> > a user to set his/her vcard. For this I am creating an iq packet like
> > this:
> >  <iq type='set'><vcard xmlns='vcard-temp'><FN>bruno</FN></vcard></iq>
> > This one gives my an error (to/from missing):
> 
> Yes. Components must always create packets with valid to and from addresses on
> the main stanza element. In the case of a vcard set, the to attribute should be
> the jid of the user you're trying to change, and the from address should be the
> 
> <iq type="set" to="foo at bar.com" from="your-component">...</iq>

Well that doesn't work too. 

> That said, I'm not sure JSM will allow this to work correctly. IE, mod_vcard
> probably has some checks to make sure only the user is allowed to change their
> own vcard. You could of-course change mod_vcard to allow packets from your
> component.

Yes, I think that's the problem. But I can't patch the jabber server for
wcs. This is just too unhandy I would say. :(


Steve





More information about the JDev mailing list