Whatever message this page gives is out now! Go check it out!

onIMServerMessage

Last update:
May 18, 2026

Description

Handles incoming error and status messages from the IM server.

Syntax

onIMServerMessage(CFEvent)

See also

Parameters

This method must take one parameter, a CFEvent structure with the following fields:
FieldDescription
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>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page