Manage push notification preferences for communities and social features
Community settings control notifications for social features like posts, comments, reactions, and member activities within communities. These settings work alongside user and channel preferences.
Modify notification preferences for a specific community:
Copy
Ask AI
let notificationManager = communityRepository.notificationManager(forCommunityId: "<community-id>")// Update community settings with enable status for particular modules// In case you would like to disable/enable notification for particular modules,// passing `AmityCommunityNotificationEvent` instance that responsible for event settings.notificationManager.enable(for: [ AmityCommunityNotificationEvent(eventType: .postCreated, isEnabled: false, roleFilter: nil)]) { success, error in if success { // handler success } else { // handler error }}// update community settings with disable statusnotificationManager.disable() { success, error in // Handle the result}