Activate / Deactivate Channel Push Notification
You can turn on or off channel push notification (FCM) for current user.
// enable
await client.enableChannelPushNotification({channelId:'my_channel_id'})
// disable
await client.disableChannelPushNotification({channelId:'my_channel_id'})
Channel Push Notification Settings (Sound)
You can change channel push notification (FCM) sound settings for current user.
// get channel push notification settings
const resp = await client.getChannelPushNotificationSettings({channelId: 'someChannelId'});
/*
{
"pushNotificationSoundAos": "Default",
"pushNotificationSoundIos": "chime"
}
*/
// update channel push notification sound settings
await client.updateChannelPushNotificationSettings({
'channelId': 'someChannelId',
'aosSound': 'Default',
'iosSound': 'chime',
});
// update channel push notification AOS sound only
await client.updateChannelPushNotificationSettings({
'channelId': 'someChannelId',
'aosSound': 'Default'
});
// update channel push notification iOS sound only
await client.updateChannelPushNotificationSettings({
'channelId': 'someChannelId',
'iosSound': 'chime'
});