-
Notifications
You must be signed in to change notification settings - Fork 115
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
Slack Auto-Read Channel Pattern with Multiple Spaces #9701
Conversation
@@ -0,0 +1,2 @@ | |||
-- Migration created on Jan 02, 2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better reviewed with hidden whitespaces (here).
const searchParams = new URLSearchParams({ | ||
kind: "custom", | ||
vaultId: p.spaceId, | ||
dataSourceId: connector.dataSourceId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚗 case typo prevented this code to work before.
}); | ||
|
||
export type SlackConfiguration = t.TypeOf<typeof SlackConfigurationTypeSchema>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this type which was duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
this.connectorId | ||
); | ||
if (!slackConfig) { | ||
return new Err(new Error("autoReadChannelPattern is not deprecated")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return new Err(new Error("autoReadChannelPattern is not deprecated")); | |
return new Err(new Error("autoReadChannelPattern is now deprecated")); |
@@ -725,12 +747,23 @@ export class SlackConnectorManager extends BaseConnectorManager<SlackConfigurati | |||
} | |||
return new Ok(botEnabledRes.value.toString()); | |||
} | |||
|
|||
case "autoReadChannelPattern": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's deprecate as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to be done in a clean up PR otherwise it prevents loading Poke.
Description
This PR resolves https://github.com/dust-tt/tasks/issues/1616.
It lets Dust employees whitelist channel patterns that should automatically be added in a specific spaces. This feature was not working with spaces before.
It adds a new column that will store a
JSONB
object representing patterns with their associated space id. One pattern can exist several times and they will be added in all the associated data source view.Poke View:
Risks
Worst-case it breaks the auto-join channel approach. Safe to rollback.
Deploy Plan