Back to product page

ContactAuthRequest callback method


Called when new contact wants to authorize for his contact list.

Syntax

  • Basic
object.ContactAuthRequest (Owner, Contact, Action)
The ContactAuthRequest(object,Owner,Contact,Action) syntax has these parts:
objectAn expression evaluating to an object of type IwodXMPPNotify
OwnerAn expression evaluating to an object of type wodXMPP
ContactXMPPContact object.
ActionXMPPActionsEnum enumeration

Remarks

This method is called only if you implemented IwodXMPPNotify interface in your application, and wodXMPP.Notification property has received reference to instance of your implementation.

This notification method is called each time an authorization request is received from someone. The notification method provides two parameters, Contact and Action.

The Contact parameter provides you with a reference to XMPPContact object which is automatically created by wodXMPP based on information known about requestor.

The Action parameter allows you to decide whether to allow or deny the request. Set this parameter to Allow if you wish to allow user to put you on his contact list. Otherwise set it to Deny. Based on your Action parameter setting, wodXMPP will reply to the server which will then add person to your Contacts list, of will send refusal message to other contact.

Don't forget - you're allowing other side to see when you're online and have you on their list. If you want to see them too, you must ask them for authorization using Subscribe method.

Platforms

Windows