채널 푸시알림 설정

채널별 사용자 푸시알림 활성화

  • JavaScript SDK v0.2.19 이후부터 사용 가능한 기능입니다.

채널 푸시알림을 (FCM 푸시알림) 사용자 별로 활성화 및 비활성화 처리 할 수 있습니다.

// enable
await client.enableChannelPushNotification({channelId:'my_channel_id'})

// disable
await client.disableChannelPushNotification({channelId:'my_channel_id'})

채널별 사용자 푸시알림 설정 (사운드)

  • JavaScript SDK v0.3.0 이후부터 사용 가능한 기능입니다.

채널 푸시알림 (FCM 푸시알림) 사운드를 사용자 별로 확인 및 변경할 수 있습니다.

// 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'
});

Last updated