Esempio n. 1
0
def register_message_hook():
    import hooks
    hooks.register('digsby.im.msg.pre', _on_message)

    # setup a handler for digsby://avcall links
    from common import urlhandler
    urlhandler.register('avcall/([\w@\.]+)/(\w+)', show_video_chat_window)
Esempio n. 2
0
def register_message_hook():
    import hooks
    hooks.register('digsby.im.msg.pre', _on_message)

    # setup a handler for digsby://avcall links
    from common import urlhandler
    urlhandler.register('avcall/([\w@\.]+)/(\w+)', show_video_chat_window)
Esempio n. 3
0
    def received_native_videochat_request(self, vidoechat_response_callback = None):
        log.info('native_video_chat_request')

        urlarg = 'makeavcall/%s' % id(self)

        if self.videochat_urlhandler is None:
            def videochat_urlhandler():
                if vidoechat_response_callback is not None:
                    vidoechat_response_callback(False)
                self.send_generic_videochat_request()

            self.videochat_urlhandler = (urlarg, videochat_urlhandler)
            urlhandler.register(*self.videochat_urlhandler)

        link = 'digsby://%s' % urlarg

        msg = _('%(name)s wants to have an Audio/Video chat. <a href="%(link)s">Send them an invite.</a>') % dict(
            name=self.buddy.name, link=link)

        self.important_system_message(msg, content_type = 'text/html')
Esempio n. 4
0
    def received_native_videochat_request(self,
                                          vidoechat_response_callback=None):
        log.info('native_video_chat_request')

        urlarg = 'makeavcall/%s' % id(self)

        if self.videochat_urlhandler is None:

            def videochat_urlhandler():
                if vidoechat_response_callback is not None:
                    vidoechat_response_callback(False)
                self.send_generic_videochat_request()

            self.videochat_urlhandler = (urlarg, videochat_urlhandler)
            urlhandler.register(*self.videochat_urlhandler)

        link = 'digsby://%s' % urlarg

        msg = _(
            '%(name)s wants to have an Audio/Video chat. <a href="%(link)s">Send them an invite.</a>'
        ) % dict(name=self.buddy.name, link=link)

        self.important_system_message(msg, content_type='text/html')