feat(webhooks): gossip WEBHOOK_UPSERT and WEBHOOK_DELETE handlers
Merge channel webhook metadata from mesh without ingesting secret tokens. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -419,6 +419,12 @@ class PearcordGuild extends EventEmitter {
|
|||||||
if (method === RPC.AUTOMOD_CONFIG_UPDATE) {
|
if (method === RPC.AUTOMOD_CONFIG_UPDATE) {
|
||||||
this.emit('automod-config', payload)
|
this.emit('automod-config', payload)
|
||||||
}
|
}
|
||||||
|
if (method === RPC.WEBHOOK_UPSERT) {
|
||||||
|
this.emit('channel-webhook', payload)
|
||||||
|
}
|
||||||
|
if (method === RPC.WEBHOOK_DELETE) {
|
||||||
|
this.emit('channel-webhook-delete', payload)
|
||||||
|
}
|
||||||
if (method === RPC.SCREEN_SHARE_UPDATE) {
|
if (method === RPC.SCREEN_SHARE_UPDATE) {
|
||||||
this.emit('screen-share', payload)
|
this.emit('screen-share', payload)
|
||||||
}
|
}
|
||||||
@@ -796,6 +802,14 @@ class PearcordGuild extends EventEmitter {
|
|||||||
broadcastGossip(this, RPC.AUTOMOD_CONFIG_UPDATE, payload)
|
broadcastGossip(this, RPC.AUTOMOD_CONFIG_UPDATE, payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gossipWebhookUpsert (payload) {
|
||||||
|
broadcastGossip(this, RPC.WEBHOOK_UPSERT, payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
gossipWebhookDelete (payload) {
|
||||||
|
broadcastGossip(this, RPC.WEBHOOK_DELETE, payload)
|
||||||
|
}
|
||||||
|
|
||||||
gossipScreenShare (payload) {
|
gossipScreenShare (payload) {
|
||||||
broadcastGossip(this, RPC.SCREEN_SHARE_UPDATE, payload)
|
broadcastGossip(this, RPC.SCREEN_SHARE_UPDATE, payload)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user