---
source_url: https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/updates
title: Manage channel updates
updated_at: 2026-06-17T11:37:26.815Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Manage channel updates

Update channel metadata and receive real-time change events.

##### Usage in Blueprints and C++

You can use PubNub's functionality via Blueprints or directly in C++ code.

* In Blueprints, you can access PubNub from any Widget or Actor. Start by [initializing chat](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#initialize-pubnub-chat) using `InitChat` on `UPubnubChatSubsystem`. Afterwards, you can use the returned `UPubnubChat` object reference to call all Chat SDK functions.

:::warning Blueprint functions
The Blueprints provided in the documentation show how you can structure your application and may contain utility methods and elements like buttons that are not part of the Unreal Chat SDK and are meant to serve as guidance.
:::

* In C++, you can use UPubnubChatSubsystem as any other Game Instance Subsystem. #include "Kismet/GameplayStatics.h" #include "Engine/GameInstance.h" #include "PubnubChatSubsystem.h" // ACTION REQUIRED: Replace ASample_ChatSubsystem with name of your Actor class void ASample_ChatSubsystem::InitChatSample() { // Get PubnubChatSubsystem from GameInstance UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(this); UPubnubChatSubsystem* PubnubChatSubsystem = GameInstance->GetSubsystem<UPubnubChatSubsystem>(); // Initialize Chat - InitChat may fail under some conditions so make sure to check the Result for errors before using the Chat FPubnubChatInitChatResult InitChatResult = PubnubChatSubsystem->InitChat(TEXT("demo"), TEXT("demo"), TEXT("Player_001")); UPubnubChat* PubnubChat = InitChatResult.Chat; } Chat now allows you to call all Chat SDK functions, for example, Chat->GetChannel("my_channel").

:::note Asynchronous and synchronous method execution
Most PubNub Unreal SDK methods are available in both asynchronous and synchronous variants.
* Asynchronous methods (Async suffix) return void and take an optional delegate parameter that fires when the operation completes. 1Channel->UpdateAsync(UpdateData, OnUpdateResponseDelegate); You can also use native callbacks that accept lambdas instead of dynamic delegates. Native callback types have the Native suffix (for example, FOnPubnubChatChannelResponseNative).
* Synchronous methods (no suffix) block the main game thread until the operation completes and return a result struct directly. 1FPubnubChatOperationResult Result = Channel->Update(UpdateData);
:::

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) for your keyset in the [Admin Portal](https://admin.pubnub.com/).
:::

## Update channel details

Edit channel metadata with `Update()` or `UpdateChannel()`.

Both methods produce the same result. Call `Update()` on a `Channel` object or `UpdateChannel()` on the `Chat` object with the channel ID.

### Method signature

#### C++ / Input parameters

* Channel->Update() 1Channel->Update(FPubnubChatUpdateChannelInputData UpdateData);
* Chat->UpdateChannel() 1Chat->UpdateChannel(2 FString ChannelID, 3 FPubnubChatUpdateChannelInputData UpdateData4);

#### Blueprint

| Parameter | Required in Channel->Update() | Required in Chat->UpdateChannel() | Description |
| --- | --- | --- | --- |
| ChannelID | FString | Optional |  | No | Yes | Unique channel identifier. |
| UpdateData | FPubnubChatUpdateChannelInputData | Optional |  | No | No | Information about the channel. |

#### FPubnubChatUpdateChannelInputData

| Parameter | Description |
| --- | --- |
| `ChannelName`Type: `FString`Default: n/a | Display name for the channel (must not be empty or consist only of whitespace characters). |
| `Description`Type: `FString`Default: n/a | Detailed description of the channel's purpose or topic. |
| `Custom`Type: `FString`Default: n/a | JSON providing custom data about the channel. Values must be scalar only; arrays or objects are not supported. [Filtering App Context data](https://www.pubnub.com/docs/general/metadata/filtering) through the `custom` property is not recommended in SDKs. |
| `Status`Type: `FString`Default: n/a | Tag that lets you categorize your app channels by their current state. The tag choice is entirely up to you and depends on your use case. |
| `Type`Type: `FString`Default: n/a | Tag that lets you categorize your app channels by their functional roles. The tag choice is entirely up to you and depends on your use case. |
| `ForceSetChannelName`Type: `bool`Default: `false` | When `true`, overwrites the channel name even if empty. |
| `ForceSetDescription`Type: `bool`Default: `false` | When `true`, overwrites the description even if empty. |
| `ForceSetCustom`Type: `bool`Default: `false` | When `true`, overwrites the custom data even if empty. |
| `ForceSetStatus`Type: `bool`Default: `false` | When `true`, overwrites the status even if empty. |
| `ForceSetType`Type: `bool`Default: `false` | When `true`, overwrites the type even if empty. |

#### Output

| Method | Description |
| --- | --- |
| `Channel->Update()`Type: `FPubnubChatOperationResult` | Contains `Error` (bool) and `ErrorMessage` (FString). Check `Error` to determine if the operation succeeded. |
| `Chat->UpdateChannel()`Type: `FPubnubChatChannelResult` | Contains `Result` (`FPubnubChatOperationResult`) and `Channel` (`UPubnubChatChannel*`). |

### Sample code

:::tip Reference code
This example is a self-contained code snippet ready to be run. Set up your Unreal project and follow the instructions in the lines marked with `ACTION REQUIRED` before running the code. Use it as a reference when working with other examples in this document.
:::

Update channel metadata asynchronously.

###### C++

###### Actor.h

```cpp
// blueprint.hrzn604-
UFUNCTION(BlueprintCallable, Category = "PubnubChat|Samples|ChatChannel")
void UpdateChannelSample();

UFUNCTION()
void OnUpdateChannelResponse(const FPubnubChatOperationResult& Result);
```

###### Actor.cpp

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::UpdateChannelSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Fields to update (name, description, custom, status, type)
	FPubnubChatUpdateChannelInputData UpdateData;
	UpdateData.ChannelName = TEXT("Updated Channel Name");
	UpdateData.Description = TEXT("New description");

	// Callback for when the operation completes
	FOnPubnubChatOperationResponseNative Callback;
	// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
	Callback.BindUObject(this, &ASample_ChatChannel::OnUpdateChannelResponse);
	Channel->UpdateAsync(UpdateData, Callback);
}

// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::OnUpdateChannelResponse(const FPubnubChatOperationResult& Result)
{
	if (Result.Error) { return; }
	// Update completed
}
```

###### Blueprint

#### Update channel from the Chat object

## Get channel updates

Receive updates when [Channel objects](https://www.pubnub.com/docs/chat/unreal-chat-sdk/learn/chat-entities/channel) are edited or removed:

* `StreamUpdates()` - monitors a single channel
* `StreamUpdatesOn()` - monitors multiple channels (static method)

Both methods return `FPubnubChatOperationResult`. Updates are delivered via the channel's `OnUpdated` delegate (with channel ID and data) and deletions via the `OnDeleted` delegate. Bind these delegates before calling `StreamUpdates()` or `StreamUpdatesOn()`.

:::note Stream update behavior
* StreamUpdates() delivers updates via the channel's OnUpdated delegate (with channel ID and data) and deletions via OnDeleted delegate.
* StreamUpdatesOn() delivers updates on any of the monitored channels via the same delegate pattern.
* To stop receiving updates, call StopStreamingUpdates() or StopStreamingUpdatesAsync() on the channel.
:::

### Method signature

#### C++ / Input parameters

* StreamUpdates() 1Channel->StreamUpdates();
* StreamUpdatesOn() (static) 1UPubnubChatChannel::StreamUpdatesOn(const TArray<UPubnubChatChannel*>& Channels);

#### Blueprint

| Parameter | Required in `StreamUpdates()` | Required in `StreamUpdatesOn()` | Description |
| --- | --- | --- | --- |
| `Channels`Type: `TArray<UPubnubChatChannel*>`Default: n/a | No | Yes | Array of [Channel objects](https://www.pubnub.com/docs/chat/unreal-chat-sdk/learn/chat-entities/channel) for which you want to get updates. |

#### Output

| Type | Description |
| --- | --- |
| `FPubnubChatOperationResult` | Contains `Error` (bool) and `ErrorMessage` (FString). Check `Error` to determine if the operation succeeded. |

#### EPubnubChatStreamedUpdateType

The `EPubnubChatStreamedUpdateType` enum describes the kind of streamed update. In C++, updates and deletions are delivered via separate delegates (`OnUpdated` and `OnDeleted`). In Blueprints, this enum may appear in event dispatchers to distinguish between the two.

| Value | Description |
| --- | --- |
| `PCSUT_Updated` | The entity's metadata was updated. |
| `PCSUT_Deleted` | The entity was deleted. |

This enum applies to all entities that support `StreamUpdates()` (Channel, User, Message, Membership).

### Sample code

Get updates on the `support` channel.

#### C++

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StreamUpdatesSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Bind to receive channel metadata updates and deletion events
	Channel->OnUpdatedNative.AddUObject(this, &ASample_ChatChannel::OnChannelUpdateReceived);
	Channel->OnDeletedNative.AddUObject(this, &ASample_ChatChannel::OnChannelDeleted);

	// Start streaming channel updates (no result callback needed)
	Channel->StreamUpdatesAsync(nullptr);

	// When updates are no longer needed, stop streaming
	Channel->StopStreamingUpdatesAsync(nullptr);
}

// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::OnChannelUpdateReceived(FString ChannelID, const FPubnubChatChannelData& ChannelData)
{
	/* e.g. refresh channel UI with updated metadata */
}

void ASample_ChatChannel::OnChannelDeleted()
{
	/* e.g. remove channel from list */
}
```

#### Blueprint

### Stopping updates

To stop receiving channel updates, call `StopStreamingUpdates()` or `StopStreamingUpdatesAsync()` on the channel.