Monitor user group status changes
Listen for real-time notifications about community channel status changes related to user groups.
Register a channel status listener
User group status events are delivered through the ChannelHandler. The current SDK provides community subchannel-level events:
TypeScript
import { NCEngine, ChannelHandler } from '@nexconn/chat';
NCEngine.addChannelHandler('community-status-handler', new ChannelHandler({
onCommunitySubChannelTypeChanged({ info }) {
console.log('Subchannel type changed:', info);
},
onCommunitySubChannelDeleted({ info }) {
console.log('Subchannel deleted:', info);
},
onCommunitySubChannelUserKicked({ info }) {
console.log('User kicked from subchannel:', info);
},
}));
info
- User group management (create, delete, add/remove members, bind/unbind subchannels) is done through the Server API. The client SDK only receives status change notifications.
- A dedicated
onUltraGroupUserGroupChangedcallback is not available in the current SDK version. Monitor user group events through the callbacks listed above or via Server API webhooks. - See User group overview for details on user group concepts.
Remove the listener
TypeScript
NCEngine.removeChannelHandler('community-status-handler');