Reputation: 332
So I'm currently working on a Skype bot thing, I wish it could automatically accept contact request so I don't have to do them manually, any idea how?
And while I was researching, I found this
ichat.AcceptAdd();
Any idea what does that do?
Upvotes: 2
Views: 3256
Reputation: 4215
I don't know if I understood what you want to accomplish..
Do you want to accept contact requests automatically? Really? Do you like being target for hackers, spammers, etc? :)
Anyway, if that's what you want to do, you can subscribe to the UserAuthorizationRequestReceived event:
var events = (_ISkypeEvents_Event) _skype;
events.UserAuthorizationRequestReceived += UserAuthorizationRequestReceived;
try
{
_skype.Attach(8);
}
catch(COMException ce)
{
RaiseErrorEvent("Unable to attach to skype.", ce);
}
private void UserAuthorizationRequestReceived(SKYPE4COMLib.User puser)
{
if (do some user check here?? )
{
puser.IsAuthorized = true;
}
}
Hope this helps.
Upvotes: 1