Leave channels
Requires App Context
Enable App Context for your keyset in the Admin Portal.
Remove a user's channel membership with Leave().
Asynchronous and synchronous method execution
Most PubNub Unreal SDK methods are available in both asynchronous and synchronous variants.
-
Asynchronous methods (
Asyncsuffix) returnvoidand take an optional delegate parameter that fires when the operation completes.1Channel->LeaveAsync(OnLeaveResponseDelegate);You can also use native callbacks that accept lambdas instead of dynamic delegates. Native callback types have the
Nativesuffix (for example,FOnPubnubChatOperationResponseNative). -
Synchronous methods (no suffix) block the main game thread until the operation completes and return a result struct directly.
1FPubnubChatOperationResult Result = Channel->Leave();
Method signature
- C++ / Input parameters
- Blueprint
1Channel->Leave();
Output
| Type | Description |
|---|---|
FPubnubChatOperationResult | Result of the operation. Check Error for failure. |
Sample code
Leave the support channel.
- C++
- Blueprint
1