From w.richert at gmx.net Tue Sep 8 22:16:04 2009 From: w.richert at gmx.net (Willi Richert) Date: Tue, 8 Sep 2009 22:16:04 +0200 Subject: [PyXMPP] Private invitation to MUC Message-ID: <200909082216.04664.w.richert@gmx.net> Hi, what is the suggested way to invite other JIDs to a group chat according to http://xmpp.org/extensions/xep-0249.html ? In the MUC classes I haven't found any method for that? Does that mean that I have to send raw XML according to the XEP-0249? And if so, how can that be done with pyxmpp? Thanks, wr From jajcus at jajcus.net Wed Sep 9 10:30:30 2009 From: jajcus at jajcus.net (Jacek Konieczny) Date: Wed, 9 Sep 2009 10:30:30 +0200 Subject: [PyXMPP] Private invitation to MUC In-Reply-To: <200909082216.04664.w.richert@gmx.net> References: <200909082216.04664.w.richert@gmx.net> Message-ID: <20090909083029.GC24751@jajo.eggsoft> On Tue, Sep 08, 2009 at 10:16:04PM +0200, Willi Richert wrote: > what is the suggested way to invite other JIDs to a group chat according to > http://xmpp.org/extensions/xep-0249.html ? > > In the MUC classes I haven't found any method for that? Does that mean that I > have to send raw XML according to the XEP-0249? And if so, how can that be > done with pyxmpp? Invitations are not implemented in PyXMPP yet and probably they won't be implemented soon ? appropriate stanzas must be built by an application itself. Greets, Jacek From david.gaarenstroom at gmail.com Wed Sep 30 10:33:47 2009 From: david.gaarenstroom at gmail.com (David Gaarenstroom) Date: Wed, 30 Sep 2009 10:33:47 +0200 Subject: [PyXMPP] How do I use VCard support? Message-ID: <9783dadb0909300133p541b4153pdc412c664d0c2e3f@mail.gmail.com> Hi, I know pyxmpp now has vcard support, but I can't find out how to use it... I assume I have to use something like: self.disco_info.add_feature("jabber:iq:vcard-temp") But where do I go from here? Perhaps it's a good idea to add an example, or to add vcard handling to echobot.py... Thanks in advance, David G From machekku at uaznia.net Wed Sep 30 11:00:43 2009 From: machekku at uaznia.net (Maciek Niedzielski) Date: Wed, 30 Sep 2009 11:00:43 +0200 Subject: [PyXMPP] How do I use VCard support? In-Reply-To: <9783dadb0909300133p541b4153pdc412c664d0c2e3f@mail.gmail.com> References: <9783dadb0909300133p541b4153pdc412c664d0c2e3f@mail.gmail.com> Message-ID: <200909301100.43758.machekku@uaznia.net> On Wednesday 30 of September 2009 10:33:47 David Gaarenstroom wrote: > I know pyxmpp now has vcard support, but I can't find out how to use > it... I assume I have to use something like: > self.disco_info.add_feature("jabber:iq:vcard-temp") > > But where do I go from here? When writing a component, I did something like this: read vcard from file: try: vcf = file(option.extensions.vcf, "rU") self.vcard = VCard(string.join(vcf.readlines(), "\r\n")) except IOError: self.vcard = None register a handler: if self.vcard: self.stream.set_iq_get_handler("vCard","vcard- temp",self.get_vcard) handler: def get_vcard(self,iq): iq = iq.make_result_response() v = iq.new_query("vcard-temp", "vCard") self.vcard.complete_xml_element(v, None) self.stream.send(iq) return True If you're writing a client then you don't need to reply to vcard requests, but maybe this helps a bit. -- Maciek xmpp:machekku at uaznia.net From david.gaarenstroom at gmail.com Wed Sep 30 11:22:26 2009 From: david.gaarenstroom at gmail.com (David Gaarenstroom) Date: Wed, 30 Sep 2009 11:22:26 +0200 Subject: [PyXMPP] How do I use VCard support? In-Reply-To: <200909301100.43758.machekku@uaznia.net> References: <9783dadb0909300133p541b4153pdc412c664d0c2e3f@mail.gmail.com> <200909301100.43758.machekku@uaznia.net> Message-ID: <9783dadb0909300222y66579903i3f34b4202a4454fa@mail.gmail.com> > When writing a component, I did something like this: > > read vcard from file: > ... > register a handler: > ... > handler: > ... > If you're writing a client then you don't need to reply to vcard requests, but > maybe this helps a bit. I forgot to mention, but I'm writing a client, not a server. My roster seems to contain vcards for some of my buddies. Mostly, I want to retrieve these vcards, but sending/updating mine is also something I want to do. As far as I can see, your code only replies to vcard requests? If so, how do I retrieve someone's vcard (and especially there photo)? Apparently they are sent to me (when I retrieve my buddies form my roster), but I don't know how to handle them properly. Thanks in advance, David