Pinning group channels
The channel pinning feature for group channels works the same as for direct channels. See Pinning Channels for the full API reference. All examples and APIs apply to GroupChannel in the same way they apply to DirectChannel.
For example, to pin a group channel:
- Kotlin
- Java
kotlin
val channel = GroupChannel("groupId")
val params = PinParams()
channel.pin(params) { success, error ->
if (error == null && success == true) {
// Pinned successfully
} else {
// Pin failed: ${error?.message}
}
}
Java
GroupChannel channel = new GroupChannel("groupId");
PinParams params = new PinParams();
channel.pin(params, (success, error) -> {
if (error == null && success != null && success) {
// Pinned successfully
} else {
// Pin failed
}
});
For additional operations (unpin, check status, listen for changes, pin within a tag), refer to Pinning Channels.