0

can someone help me with automatically accepting a friend request with Skype4Py? Right now I'm using

def UserAuthorizationRequestReceived(user):
    user.IsAuthorized = true

and

skype.UserAuthorizationRequestReceived = UserAuthorizationRequestReceived

But it doesn't seem to be working Thanks!

(Documentation: http://skype4py.sourceforge.net/doc/html/)

Andrew Wong
  • 115
  • 10

1 Answers1

0

From the documentation for Skype4Py::utils::EventHandlingBase:

  1. C{On...} properties.

    This method lets you use any callables as event handlers. Simply assign them to C{On...} properties (where "C{...}" is the name of the event) of the object whose events you are interested in. For example::

     import Skype4Py
    
     def user_status(Status):
         print 'The status of the user changed'
    
     skype = Skype4Py.Skype()
     skype.OnUserStatus = user_status
    

You need to attach the function to skype.OnUserAuthorizationRequestReceived instead.

Hopefully, you're doing some check to make sure that your application will not be the target of spam attacks because you're accepting all requests.

Fredrick Brennan
  • 7,079
  • 2
  • 30
  • 61