feat(webhooks): Phase 685 openWebhooks deep-link parser (v0.8.660)

Add parseOpenWebhooksQuery and openWebhooks field on guild-channel deep
links for ?webhooks=1 onboarding parity.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 00:26:52 -04:00
co-authored by Cursor
parent 04147f2952
commit 6870235753
+15 -1
View File
@@ -125,6 +125,7 @@ function parsePearcordDeepLink (url) {
const assignMemberRoles = parseAssignMemberRolesQuery(m[3] || '')
const openSlashCommands = parseOpenSlashCommandsQuery(m[3] || '')
const openBots = parseOpenBotsQuery(m[3] || '')
const openWebhooks = parseOpenWebhooksQuery(m[3] || '')
return {
kind: 'guild-channel',
guildId: m[1],
@@ -135,7 +136,8 @@ function parsePearcordDeepLink (url) {
editChannelPermissions,
assignMemberRoles,
openSlashCommands,
openBots
openBots,
openWebhooks
}
}
m = GUILD_ONLY.exec(s)
@@ -213,6 +215,18 @@ function parseOpenBotsQuery (search) {
return false
}
function parseOpenWebhooksQuery (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 === 'webhooks' || k === 'webhook-integrations') 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('&')) {