Commit graph

4 commits

Author SHA1 Message Date
Lance Stout
2d90deb96a The ifrom parameter doesn't need special treatment. 2011-08-26 22:06:32 -07:00
Lance Stout
1d22a04721 Added support for custom OOB transfer handlers.
Accepting download requests can be done using:

    self['xep_0066'].register_url_handler(handler=self.oob_download)
    # Add jid=... to specify a handler for a particular JID for a
    # componenent.

    def oob_download(self, iq):
        if iq['from'] not in self.custom_oob_whitelist:
            raise XMPPError('not-authorized')
        try:
            data = urllib2.urlopen(iq['oob_transfer']['url'])
            file = open('oob_download', 'w+')
            file.write(data.read())
            file.close()
            data.close()
        except:
            raise XMPPError('item-not-found')
2011-07-05 09:22:17 -07:00
Lance Stout
cccccdcc0a Add logging to XEP-0066. 2011-07-03 20:39:03 -07:00
Lance Stout
086bf89d69 Added XEP-0066: Out-of-Band Data 2011-07-03 00:36:36 -07:00