-
Notifications
You must be signed in to change notification settings - Fork 0
chat
The Chat module connects to the Photon Chat service for channel-based and private text messaging, presence and friend status. It is independent of Realtime: initialise, connect and service it separately. Connection diagnostics live in Chat Peer.
Note
After connecting you must call photon_chat_service every step for the Chat client to send and receive.
Initialise, connect and service the Chat client:
- photon_chat_init
- photon_chat_shutdown
- photon_chat_service
- photon_chat_select_region
- photon_chat_connect
- photon_chat_disconnect
Subscribe to channels, send messages and manage friends:
- photon_chat_operation_subscribe
- photon_chat_operation_unsubscribe
- photon_chat_operation_publish_message
- photon_chat_operation_send_private_message
- photon_chat_operation_set_online_status
- photon_chat_operation_add_friends
- photon_chat_operation_remove_friends
Query Chat connection state:
- photon_chat_is_initialized
- photon_chat_is_connected
- photon_chat_get_state
- photon_chat_get_disconnect_cause
- photon_chat_get_user_id
- photon_chat_get_region
- photon_chat_get_server_time
- photon_chat_get_server_time_offset
- photon_chat_get_bytes_in
- photon_chat_get_bytes_out
Inspect subscribed channels and their cached messages:
- photon_chat_get_channel_count
- photon_chat_get_channel_name
- photon_chat_get_channel_message_count
- photon_chat_get_channel_message
- photon_chat_get_channel_sender
Read binary broadcast payloads:
- photon_chat_get_broadcast_queue_count
- photon_chat_clear_broadcast_queue
- photon_chat_peek_next_broadcast_size
- photon_chat_peek_next_broadcast_channel
- photon_chat_receive_one_broadcast_buffer
Register and remove the Chat event callbacks:
- photon_chat_set_callback_debug
- photon_chat_set_callback_connected
- photon_chat_set_callback_state_change
- photon_chat_set_callback_connection_error
- photon_chat_set_callback_client_error
- photon_chat_set_callback_warning
- photon_chat_set_callback_server_error
- photon_chat_set_callback_disconnected
- photon_chat_set_callback_status_update
- photon_chat_set_callback_get_messages
- photon_chat_set_callback_private_message
- photon_chat_set_callback_receive_broadcast
- photon_chat_remove_callback_debug
- photon_chat_remove_callback_connected
- photon_chat_remove_callback_state_change
- photon_chat_remove_callback_connection_error
- photon_chat_remove_callback_client_error
- photon_chat_remove_callback_warning
- photon_chat_remove_callback_server_error
- photon_chat_remove_callback_disconnected
- photon_chat_remove_callback_status_update
- photon_chat_remove_callback_get_messages
- photon_chat_remove_callback_private_message
- photon_chat_remove_callback_receive_broadcast
The Chat module uses the following structs:
The Chat module defines the following constants:
- PhotonChatState
- PhotonChatDisconnectCause
- PhotonChatAppErrorCode
- PhotonChatUserStatus
- PhotonChatChannelType
- PhotonChatOperationCode
- PhotonChatEventCode
- PhotonChatParameterCode
Initialises the Chat client. Call this once before any other Chat function.
Syntax:
photon_chat_init()
Returns:
Whether initialisation succeeded.
Shuts the Chat client down and releases its resources.
Syntax:
photon_chat_shutdown()
Returns:
Whether the client was shut down.
Dispatches queued incoming and outgoing traffic for the Chat client. This must be called every step while connected.
Syntax:
photon_chat_service()
Returns:
Whether the client was serviced.
Selects the Chat (Name Server) region to connect to (for example "eu", "us", "asia"). Call before photon_chat_connect — unlike Realtime, Chat has no available-regions callback to pick from.
Syntax:
photon_chat_select_region(region)
| Argument | Type | Description |
|---|---|---|
| region | String | The region token to use. |
Returns:
Whether the region was recorded.
Connects to the Photon Chat service using the given Application ID and application version. The result is delivered to photon_chat_set_callback_connected.
Syntax:
photon_chat_connect(app_id, app_version, options=undefined)
| Argument | Type | Description |
|---|---|---|
| app_id | String | Your Photon Chat Application ID. |
| app_version | String | A version string of your choosing for your game build. |
| options | PhotonChatConnectOptions | Optional connection options. |
Returns:
Whether the connection attempt started.
Example:
var _app_id = extension_get_option_value("GMPhoton", "appIdChat");
photon_chat_connect(_app_id, "1.0", new PhotonChatConnectOptions());Disconnects the Chat client. The photon_chat_set_callback_disconnected callback fires once the disconnect completes.
Syntax:
photon_chat_disconnect()
Returns:
Whether the disconnect started.
Subscribes to one or more chat channels. Messages then arrive via photon_chat_set_callback_get_messages.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_operation_subscribe(channels, messages_from_history=undefined, callback=undefined)
| Argument | Type | Description |
|---|---|---|
| channels | Array of String | The channel names to subscribe to. |
| messages_from_history | Real | How many historical messages to fetch per channel (0 for none). |
| callback | Function | Optional callback invoked with the subscription results. |
Returns:
Whether the operation was sent.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| results | Array of PhotonChatSubscribeResult | The per-channel subscription results. |
Unsubscribes from one or more chat channels.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_operation_unsubscribe(channels, callback=undefined)
| Argument | Type | Description |
|---|---|---|
| channels | Array of String | The channel names to unsubscribe from. |
| callback | Function | Optional callback invoked with the unsubscribed channels. |
Returns:
Whether the operation was sent.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| channels | Array of String | The channel names that were unsubscribed. |
Publishes a message to a subscribed channel. Subscribers receive it via photon_chat_set_callback_get_messages.
Syntax:
photon_chat_operation_publish_message(channel_name, message)
| Argument | Type | Description |
|---|---|---|
| channel_name | String | The channel to publish to. |
| message | String | The message text. |
Returns:
Whether the operation was sent.
Sends a private message to another user. The recipient receives it via photon_chat_set_callback_private_message.
Syntax:
photon_chat_operation_send_private_message(user_name, message, encrypt=undefined)
| Argument | Type | Description |
|---|---|---|
| user_name | String | The recipient's user ID. |
| message | String | The message text. |
| encrypt | Boolean | Whether to encrypt the message. |
Returns:
Whether the operation was sent.
Sets the local user's online status, optionally with a status message. Friends are notified via photon_chat_set_callback_status_update.
Syntax:
photon_chat_operation_set_online_status(status, message=undefined)
| Argument | Type | Description |
|---|---|---|
| status | PhotonChatUserStatus | The status to broadcast. |
| message | String | An optional status message. |
Returns:
Whether the operation was sent.
Adds users to the local user's friend list to receive their status updates.
Syntax:
photon_chat_operation_add_friends(user_ids)
| Argument | Type | Description |
|---|---|---|
| user_ids | Array of String | The user IDs to add. |
Returns:
Whether the operation was sent.
Removes users from the local user's friend list.
Syntax:
photon_chat_operation_remove_friends(user_ids)
| Argument | Type | Description |
|---|---|---|
| user_ids | Array of String | The user IDs to remove. |
Returns:
Whether the operation was sent.
Returns whether the Chat client has been initialised.
Syntax:
photon_chat_is_initialized()
Returns:
Whether the client is initialised.
Returns whether the Chat client is connected.
Syntax:
photon_chat_is_connected()
Returns:
Whether the client is connected.
Returns the current Chat client state.
Syntax:
photon_chat_get_state()
Returns:
The current state.
Returns the cause of the most recent Chat disconnect.
Syntax:
photon_chat_get_disconnect_cause()
Returns:
The disconnect cause.
Returns the local user's ID.
Syntax:
photon_chat_get_user_id()
Returns:
The local user ID.
Returns the region the Chat client is connected to.
Syntax:
photon_chat_get_region()
Returns:
The current region.
Returns the current Chat server time in milliseconds.
Syntax:
photon_chat_get_server_time()
Returns:
The server time in milliseconds.
Returns the offset between local time and Chat server time, in milliseconds.
Syntax:
photon_chat_get_server_time_offset()
Returns:
The server time offset in milliseconds.
Returns the total number of bytes received by the Chat client.
Syntax:
photon_chat_get_bytes_in()
Returns:
The number of bytes received.
Returns the total number of bytes sent by the Chat client.
Syntax:
photon_chat_get_bytes_out()
Returns:
The number of bytes sent.
Returns the number of channels of the given type the client is currently subscribed to.
Syntax:
photon_chat_get_channel_count(channel_type)
| Argument | Type | Description |
|---|---|---|
| channel_type | PhotonChatChannelType | The channel type (public or private). |
Returns:
The number of channels.
Returns the name of a subscribed channel of the given type by index.
Syntax:
photon_chat_get_channel_name(channel_type, index)
| Argument | Type | Description |
|---|---|---|
| channel_type | PhotonChatChannelType | The channel type. |
| index | Real | The zero-based channel index. |
Returns:
The channel name.
Returns the number of cached messages in the given channel.
Syntax:
photon_chat_get_channel_message_count(channel_type, channel_name)
| Argument | Type | Description |
|---|---|---|
| channel_type | PhotonChatChannelType | The channel type. |
| channel_name | String | The channel name. |
Returns:
The number of cached messages.
Returns a cached message from the given channel by index.
Syntax:
photon_chat_get_channel_message(channel_type, channel_name, index)
| Argument | Type | Description |
|---|---|---|
| channel_type | PhotonChatChannelType | The channel type. |
| channel_name | String | The channel name. |
| index | Real | The zero-based message index. |
Returns:
The message text.
Returns the sender of a cached message from the given channel by index.
Syntax:
photon_chat_get_channel_sender(channel_type, channel_name, index)
| Argument | Type | Description |
|---|---|---|
| channel_type | PhotonChatChannelType | The channel type. |
| channel_name | String | The channel name. |
| index | Real | The zero-based message index. |
Returns:
The sender's user ID.
Returns the number of buffered binary broadcast messages waiting to be read.
Syntax:
photon_chat_get_broadcast_queue_count()
Returns:
The number of queued broadcasts.
Clears all buffered binary broadcast messages without reading them.
Syntax:
photon_chat_clear_broadcast_queue()
Returns:
Whether the queue was cleared.
Returns the size in bytes of the next buffered broadcast without removing it from the queue.
Syntax:
photon_chat_peek_next_broadcast_size()
Returns:
The size of the next broadcast in bytes.
Returns the channel name of the next buffered broadcast without removing it from the queue.
Syntax:
photon_chat_peek_next_broadcast_channel()
Returns:
The channel of the next broadcast.
Removes the next buffered broadcast from the queue and writes its payload into the given buffer.
Syntax:
photon_chat_receive_one_broadcast_buffer(out_data, max_bytes, offset)
| Argument | Type | Description |
|---|---|---|
| out_data | Buffer | The buffer to write the payload into. |
| max_bytes | Real | The maximum number of bytes to write. |
| offset | Real | The offset within the buffer to start writing at. |
Returns:
A struct describing the received broadcast.
Registers the callback fired with Chat SDK debug output.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_debug(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call with debug output. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| debug_level | Real | The debug level of the message. |
| message | String | The debug message. |
Registers the callback fired when the Chat client finishes connecting.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_connected(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on connect. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| error_code | Real | The connect result code (0 on success). |
| error_string | String | A human-readable result message. |
Registers the callback fired when the Chat client state changes.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_state_change(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a state change. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| state | PhotonChatState | The new client state. |
Registers the callback fired on a low-level connection error.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_connection_error(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a connection error. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| error_code | Real | The connection error code. |
Registers the callback fired on a client-side error.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_client_error(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a client error. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| error_code | Real | The client error code. |
Registers the callback fired on a client warning.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_warning(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a warning. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| warning_code | Real | The warning code. |
Registers the callback fired on a server-reported error.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_server_error(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a server error. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| error_code | Real | The server error code. |
Registers the callback fired when the Chat client has disconnected. The callback takes no arguments.
Syntax:
photon_chat_set_callback_disconnected(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on disconnect. |
Returns:
Whether the callback was set.
Registers the callback fired when a friend's status changes.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_status_update(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a status update. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| user | String | The user whose status changed. |
| status | PhotonChatUserStatus | The user's new status. |
| got_message | Boolean | Whether a status message accompanied the update. |
| message | String | The status message, or empty if none. |
Registers the callback fired when messages are received on a subscribed channel.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_get_messages(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call when messages arrive. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| channel_name | String | The channel the messages arrived on. |
| messages | Array of PhotonChatMessage | The received messages. |
Registers the callback fired when a private message is received.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_private_message(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a private message. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| sender | String | The sender's user ID. |
| channel_name | String | The private channel name. |
| message | String | The message text. |
Registers the callback fired when a binary broadcast is received. The payload is queued; read it with photon_chat_receive_one_broadcast_buffer.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.
Syntax:
photon_chat_set_callback_receive_broadcast(callback)
| Argument | Type | Description |
|---|---|---|
| callback | Function | The function to call on a broadcast. |
Returns:
Whether the callback was set.
Triggers:
The callback is invoked with the following arguments:
| Key | Type | Description |
|---|---|---|
| channel_name | String | The channel the broadcast arrived on. |
| byte_length | Real | The size of the broadcast payload in bytes. |
Removes the debug callback registered with photon_chat_set_callback_debug.
Syntax:
photon_chat_remove_callback_debug()
Returns:
Whether the callback was removed.
Removes the connected callback registered with photon_chat_set_callback_connected.
Syntax:
photon_chat_remove_callback_connected()
Returns:
Whether the callback was removed.
Removes the state-change callback registered with photon_chat_set_callback_state_change.
Syntax:
photon_chat_remove_callback_state_change()
Returns:
Whether the callback was removed.
Removes the connection-error callback registered with photon_chat_set_callback_connection_error.
Syntax:
photon_chat_remove_callback_connection_error()
Returns:
Whether the callback was removed.
Removes the client-error callback registered with photon_chat_set_callback_client_error.
Syntax:
photon_chat_remove_callback_client_error()
Returns:
Whether the callback was removed.
Removes the warning callback registered with photon_chat_set_callback_warning.
Syntax:
photon_chat_remove_callback_warning()
Returns:
Whether the callback was removed.
Removes the server-error callback registered with photon_chat_set_callback_server_error.
Syntax:
photon_chat_remove_callback_server_error()
Returns:
Whether the callback was removed.
Removes the disconnected callback registered with photon_chat_set_callback_disconnected.
Syntax:
photon_chat_remove_callback_disconnected()
Returns:
Whether the callback was removed.
Removes the status-update callback registered with photon_chat_set_callback_status_update.
Syntax:
photon_chat_remove_callback_status_update()
Returns:
Whether the callback was removed.
Removes the get-messages callback registered with photon_chat_set_callback_get_messages.
Syntax:
photon_chat_remove_callback_get_messages()
Returns:
Whether the callback was removed.
Removes the private-message callback registered with photon_chat_set_callback_private_message.
Syntax:
photon_chat_remove_callback_private_message()
Returns:
Whether the callback was removed.
Removes the receive-broadcast callback registered with photon_chat_set_callback_receive_broadcast.
Syntax:
photon_chat_remove_callback_receive_broadcast()
Returns:
Whether the callback was removed.
The states the Chat client moves through, returned by photon_chat_get_state.
These constants are referenced by the following functions:
| Member | Description |
|---|---|
Unknown |
Unknown state. |
Uninitialized |
The client has not been initialised. |
ConnectingToNameServer |
Connecting to the name server. |
ConnectedToNameServer |
Connected to the name server. |
Authenticating |
Authenticating. |
Authenticated |
Authenticated. |
DisconnectingFromNameServer |
Disconnecting from the name server. |
ConnectingToFrontEnd |
Connecting to the chat front-end server. |
ConnectedToFrontEnd |
Connected to the chat front-end server (ready to chat). |
Disconnecting |
Disconnecting. |
Disconnected |
Fully disconnected. |
The reasons the Chat client can be disconnected, returned by photon_chat_get_disconnect_cause.
These constants are referenced by the following functions:
| Member | Description |
|---|---|
Unknown |
Unknown cause. |
None |
No disconnect. |
ServerUserLimit |
The server's user limit was reached. |
ExceptionOnConnect |
An exception occurred while connecting. |
DisconnectByServer |
The server closed the connection. |
DisconnectByServerLogic |
Server-side logic closed the connection. |
TimeoutDisconnect |
The connection timed out. |
Exception |
A client-side exception occurred. |
InvalidAuthentication |
Authentication was invalid. |
MaxCcuReached |
The application's maximum concurrent-user limit was reached. |
InvalidRegion |
The requested region was invalid. |
OperationNotAllowed |
An operation was not allowed in the current state. |
CustomAuthenticationFailed |
Custom authentication failed. |
Application-level result codes reported by the Chat service.
| Member | Description |
|---|---|
Ok |
The operation succeeded. |
OperationDenied |
The operation was denied. |
OperationInvalid |
The operation was invalid. |
InternalServerError |
An internal server error occurred. |
InvalidAuthentication |
Authentication was invalid. |
GameIdAlreadyExists |
The game ID already exists. |
GameFull |
The game is full. |
GameClosed |
The game is closed. |
AlreadyMatched |
Already matched. |
ServerFull |
The server is full. |
UserBlocked |
The user is blocked. |
NoMatchFound |
No match was found. |
GameDoesNotExist |
The game does not exist. |
MaxCcuReached |
The maximum concurrent-user limit was reached. |
InvalidRegion |
The region was invalid. |
CustomAuthenticationFailed |
Custom authentication failed. |
The user statuses that can be broadcast with photon_chat_operation_set_online_status.
These constants are referenced by the following functions:
| Member | Description |
|---|---|
Offline |
The user is offline. |
Invisible |
The user appears offline to others. |
Online |
The user is online. |
Away |
The user is away. |
Dnd |
The user does not want to be disturbed. |
Lfg |
The user is looking for a game. |
Playing |
The user is playing. |
The chat channel types.
These constants are referenced by the following functions:
- photon_chat_get_channel_count
- photon_chat_get_channel_name
- photon_chat_get_channel_message_count
- photon_chat_get_channel_message
- photon_chat_get_channel_sender
| Member | Description |
|---|---|
Public |
A public channel (subscribed via photon_chat_operation_subscribe). |
Private |
A private channel (created by private messages). |
The Chat operation codes. Primarily useful for low-level diagnostics.
| Member | Description |
|---|---|
Authenticate |
Authenticate with the chat service. |
Subscribe |
Subscribe to channels. |
Unsubscribe |
Unsubscribe from channels. |
Publish |
Publish a message. |
SendPrivate |
Send a private message. |
ChannelHistory |
Fetch channel history. |
UpdateStatus |
Update the user's status. |
AddFriends |
Add friends. |
RemoveFriends |
Remove friends. |
The Chat event codes. Primarily useful for low-level diagnostics.
| Member | Description |
|---|---|
ChatMessages |
Channel messages were received. |
Users |
A user list was received. |
PrivateMessage |
A private message was received. |
FriendList |
A friend list was received. |
StatusUpdate |
A friend status update was received. |
Subscribe |
A subscribe result was received. |
Unsubscribe |
An unsubscribe result was received. |
The Chat protocol parameter codes. Primarily useful for low-level diagnostics.
| Member | Description |
|---|---|
Channels |
The channels parameter. |
Messages |
The messages parameter. |
Message |
A single message parameter. |
Senders |
The senders parameter. |
Sender |
A single sender parameter. |
ChannelUserCount |
The channel user count parameter. |
MessageId |
A message ID parameter. |
MessageIds |
A message IDs parameter. |
Status |
A status parameter. |
Friends |
The friends parameter. |
SkipMessage |
The skip-message flag parameter. |
HistoryLength |
The history-length parameter. |
SubscribeResults |
The subscribe-results parameter. |
Properties |
The properties parameter. |
ChannelId |
A channel ID parameter. |
Region |
The region parameter. |
AppVersion |
The application version parameter. |
Secret |
The authentication secret parameter. |
AuthType |
The authentication type parameter. |
AuthParams |
The authentication parameters parameter. |
AuthData |
The authentication data parameter. |
UserId |
The user ID parameter. |
AppId |
The application ID parameter. |
Address |
The address parameter. |
Options passed to photon_chat_connect.
This struct is referenced by the following functions:
| Member | Type | Description |
|---|---|---|
| authentication_values | PhotonRealtimeAuthenticationValues | Authentication values for a custom auth provider. |
| server_address | String | Override the Photon name server address. Leave unset to use the default cloud. |
| use_background_thread | Boolean | Whether to use a background send/receive thread. Honored only on Nintendo Switch; ignored on other platforms. |
A single chat message delivered by photon_chat_set_callback_get_messages.
This struct is referenced by the following functions:
| Member | Type | Description |
|---|---|---|
| sender | String | The sender's user ID. |
| content | String | The message text. |
A per-channel result delivered by the photon_chat_operation_subscribe callback.
This struct is referenced by the following functions:
| Member | Type | Description |
|---|---|---|
| channel_name | String | The channel name. |
| success | Boolean | Whether the subscription to this channel succeeded. |
GameMaker 2026