User Guide

IM Gateway CFC incoming message methods 1013
onIMServerMessage
Description
Handles incoming error and status messages from the IM server.
Syntax
onIMServerMessage(CFEvent)
See also
onIncomingMessage
, onAddBuddyRequest, onAddBuddyResponse, onBuddyStatus
Parameters
This method must take one parameter, a CFEvent structure with the following fields:
Example
The following example logs the sender, message, and a timestamp when an IM server sends an
error or status message:
<cffunction name="onIMServerMessage">
<!--- This function just logs the message. --->
<cfargument name="CFEvent" type="struct" required="YES">
<cflog file="#CFEvent.GatewayID#Status"
text="onIMServerMEssage; SENDER: #CFEvent.OriginatorID# MESSAGE:
#CFEvent.Data.MESSAGE# TIMESTAMP: #CFEvent.Data.TIMESTAMP#">
</cffunction>
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 (buddy name) of the message originator
cfcMethod This CFC method; by default, onIMServerMessage
data.MESSAGE The message sent by the server
data.SENDER The sender’s ID; identical to the originatorID
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