Skip to main content

Multi-device channel status sync

The Nexconn Chat SDK automatically syncs channel status (pin, DND level) across all connected devices when changes occur.

How it works

When a user pins a channel or changes DND settings on one device, all other connected devices receive real-time sync notifications through the ChannelHandler.

Listen for sync events

TypeScript
import { NCEngine, ChannelHandler } from '@nexconn/chat';

NCEngine.addChannelHandler('sync-handler', new ChannelHandler({
// Called when a channel's pin status changes
onChannelPinnedSync({ channelIdentifier, isPinned }) {
console.log('Pin synced:', channelIdentifier, 'pinned:', isPinned);
// Update your channel list UI accordingly
},

// Called when a channel's DND level changes
onChannelNoDisturbLevelSync({ channelIdentifier, level }) {
console.log('DND synced:', channelIdentifier, 'level:', level);
// Update your DND settings UI accordingly
},
}));

ChannelNoDisturbLevel values

ValueDescription
ChannelNoDisturbLevel.ALL_MESSAGENotify for all messages
ChannelNoDisturbLevel.DEFAULTDefault notification level (follows global settings)
ChannelNoDisturbLevel.MENTIONNotify on any @mention
ChannelNoDisturbLevel.MENTION_USERSNotify only when mentioned by name
ChannelNoDisturbLevel.MENTION_ALLNotify only on @all mentions
ChannelNoDisturbLevel.MUTEDFully muted — no notifications

Remove the handler

TypeScript
NCEngine.removeChannelHandler('sync-handler');