Description

Handles incoming error and status messages from the IM server.

Syntax

onIMServerMessage(CFEvent)

See also

onIncomingMessageonAddBuddyRequestonAddBuddyResponseonBuddyStatus

Parameters

This method must take one parameter, a CFEvent structure with the following fields:

Field

Description

gatewayType

Gateway type, either XMPP or SAMETIME

gatewayID

The ID of the gateway instance, as configured in ColdFusion 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

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>

 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy