Add openWorkers deep-link query for worker modal parity (Phase 687).

Parse ?workers=1 and integration-workers on guild-channel deep links so
onboarding and settings can open the integration worker registry modal.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 00:41:52 -04:00
co-authored by Cursor
parent 8ffdb02a67
commit 7f7ce0c584
+15 -1
View File
@@ -127,6 +127,7 @@ function parsePearcordDeepLink (url) {
const openBots = parseOpenBotsQuery(m[3] || '')
const openWebhooks = parseOpenWebhooksQuery(m[3] || '')
const openAutomation = parseOpenAutomationQuery(m[3] || '')
const openWorkers = parseOpenWorkersQuery(m[3] || '')
return {
kind: 'guild-channel',
guildId: m[1],
@@ -139,7 +140,8 @@ function parsePearcordDeepLink (url) {
openSlashCommands,
openBots,
openWebhooks,
openAutomation
openAutomation,
openWorkers
}
}
m = GUILD_ONLY.exec(s)
@@ -241,6 +243,18 @@ function parseOpenAutomationQuery (search) {
return false
}
function parseOpenWorkersQuery (search) {
const q = filterDeepLinkQuery('guild-channel', String(search || '').replace(/^\?/, ''))
for (const part of q.split('&')) {
if (!part) continue
const eq = part.indexOf('=')
const k = eq >= 0 ? part.slice(0, eq) : part
const v = eq >= 0 ? part.slice(eq + 1) : ''
if (k === 'workers' || k === 'integration-workers') return !v || v === '1' || v === 'true'
}
return false
}
function parseEditChannelPermissionsQuery (search) {
const q = filterDeepLinkQuery('guild-channel', String(search || '').replace(/^\?/, ''))
for (const part of q.split('&')) {