# OnMessageReceived

{% hint style="danger" %}
This feature is deprecated and will be unsupported.
{% endhint %}

Example:

```csharp
ChatClient.OnMessageReceived += (chatMessage) =>
{
    Console.WriteLine($"New message from {chatMessage.UserName}: {chatMessage.Message}");
};
```
