feat(platform): Phase 119 audit filter, CSV mesh timestamps, GUILD_SYNC (v0.8.83)
- setAuditLogExportFilter + view.auditLogExportFilter - pushAuditExportCsvToMesh updates lastCsvMeshPushAt on schedule - getAutomationHealthDashboard passes auditExportCsvMeta for dashboard Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2774,6 +2774,7 @@ class PearcordPlatform extends EventEmitter {
|
||||
}
|
||||
const automationDigestNotifyPrefs = await this.getAutomationDigestNotifyPrefs()
|
||||
const digestRelayHandoff = await this.getLastDigestRelayHandoff()
|
||||
const auditExportCsvMeta = await this.getAuditExportCsvExport().catch(() => null)
|
||||
return buildAutomationHealthDashboard({
|
||||
auditExportSchedule,
|
||||
digestExportSchedule,
|
||||
@@ -2783,10 +2784,19 @@ class PearcordPlatform extends EventEmitter {
|
||||
workerReleaseHint,
|
||||
deliveryMetrics,
|
||||
automationDigestNotifyPrefs,
|
||||
digestRelayHandoff
|
||||
digestRelayHandoff,
|
||||
auditExportCsvMeta
|
||||
})
|
||||
}
|
||||
|
||||
async setAuditLogExportFilter (filter = 'all') {
|
||||
const allowed = new Set(['all', 'automod', 'automation', 'moderation'])
|
||||
const f = allowed.has(filter) ? filter : 'all'
|
||||
await this.updateUserPrefs({ auditLogExportFilter: f })
|
||||
this.emit('audit-log-export-filter', f)
|
||||
return f
|
||||
}
|
||||
|
||||
async getLastDigestRelayHandoff () {
|
||||
if (!this.guild?.guild) return null
|
||||
await this._initDeliveryReceipts(this.guild.guild.id)
|
||||
@@ -6314,6 +6324,9 @@ class PearcordPlatform extends EventEmitter {
|
||||
if (this.guild.gossipAuditExportCsvSync) {
|
||||
this.guild.gossipAuditExportCsvSync(payload)
|
||||
}
|
||||
await this.deliveryReceipts.setAuditExportSchedule({
|
||||
lastCsvMeshPushAt: exported.exportedAt || Date.now()
|
||||
})
|
||||
this.emit('audit-export-csv-sync', payload)
|
||||
return exported
|
||||
}
|
||||
@@ -8260,6 +8273,7 @@ class PearcordPlatform extends EventEmitter {
|
||||
workerReleaseHint,
|
||||
workerInstallPlan,
|
||||
auditLogFilterOptions,
|
||||
auditLogExportFilter: userPrefs?.auditLogExportFilter || 'all',
|
||||
appVersion: this.appVersion,
|
||||
automationHookMeta,
|
||||
integrationWorkerTemplates,
|
||||
|
||||
Reference in New Issue
Block a user