-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dest: move slack DM to nfydest.Registry
#3983
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Replaced type definitions with nfydest equivalents - Updated type info and validation methods - Aligned dynamic parameters and fields with new interfaces - Adjusted imports and model mappings in graphql schema
- Implement registry for managing notification providers - Enable provider registration and unique ID enforcement - Support provider-specific field validation and info display - Add error handling for unknown types and unsupported operations
- Updated references to DestinationDisplayInfo struct - Changed import paths to use nfydest package - Removed redundant struct definition from models_gen.go - Implemented nfydest.DisplayInfo in related methods and functions
- Added nfydest registry for improved destination management - Implemented Slack channel and DM destination types - Refactored destination fields handling to leverage nfydest - Introduced support for searching and validating destination fields via nfydest
- Implement default limit, sorting, and case-insensitive search - Add handling for pagination, filtering by cursor, and omit options
- Added DestRegistry to initialize stores and register providers - Removed unused Slack DM sender implementation - Changed registry behavior to panic on duplicate providers
- Use shared package for Slack constants and field IDs - Remove redundant Slack channel handling code - Simplify destination display logic with registry delegate
- Enhance server configuration with DestReg support for better registry handling.
- Changed `ValidateField` to return only an error simplifying error handling. - Introduced `ValidateDest` to validate destination and its arguments. - Added `ErrNotEnabled` to handle disabled destination types. - Updated Slack provider implementations to use new validation logic.
- Added validation for notification destinations - Improved error messaging and handling for unsupported destination types - Integrated new error type checks for more accurate error reporting
- Removed validation logic for Slack channel and direct message destinations - Simplifies validation process by focusing on supported destination types
- Handle client-side validation errors separately
- Registered Slack DM sender in the destination registry - Clarified GraphQL schema with real-time validation support - Fixed validation target for Slack DM to use user ID instead of channel ID
- Adjust Slack User Group channel search pending migration - Add TODO to remove hack after migration to new system
- Temporarily adjust DestType for Slack channel searches until migration to new system.
This reverts commit 29fa4fe.
- Adjust promise handling to check for response errors before calling onClose - Prevent onClose if there is an error to ensure proper error reporting
KatieMSB
approved these changes
Jul 12, 2024
allending313
approved these changes
Jul 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
nfydest.Registry
Validating through the registry ensures there are no unknown fields, and re-uses the single-field validation method to ensure all fields are valid.