User Guide
1006 Chapter 6: ColdFusion MX Event Gateway Reference
onAddBuddyRequest
Description
Handles incoming requests for users to add the gateway user name as one of their buddies.
Syntax
onAddBuddyRequest(CFEvent)
See also
onIncomingMessage
, onAddBuddyResponse, onBuddyStatus, onIMServerMessage
Parameters
The method must take one parameter, a CFEvent structure with the following fields:
Returns
The function can optionally return a value to send a response message. The return structure must
contain the following fields:
Field Description
gatewayType Gateway type, either XMPP or SAMETIME
gatewayID The ID of the gateway instance, as configured in ColdFusion MX Administrator
originatorID The IM ID of the message originator
cfcMethod This CFC method; by default, onAddBuddyRequest.
data.MESSAGE The message that was sent with the request
data.SENDER The sender’s ID; identical to the originatorID field value
data.RECIPIENT The recipient’s ID, as specified in the gateway’s configuration file
data.TIMESTAMP The date and time when the message was sent
Field Description
command One of the following:
• accept Accept the request to add you as a buddy. ColdFusion adds the user
to the permit list of users that can get status information.
• decline Deny request to add you as a buddy. ColdFusion adds the user to
the deny list of users that can get status information.
• noact Take no action. ColdFusion does not respond to the requestor.
buddyID ID to which to send the message. Normally, the value of the
CFEvent.data.SENDER field. Not used with the
noact command.
reason A text message describing the reason for the action. Not used with the
noact
command.