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 status
notificationManager.disable() { success, error in
// Handle the result
}