feat(platform): pruneDiscoveryListings wrapper
Expose discovery.pruneStaleListings for future IPC; listing reads already auto-prune via listPublicListings in view(). Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1235,6 +1235,13 @@ class PearcordPlatform extends EventEmitter {
|
||||
return this.discovery.listPublicListings()
|
||||
}
|
||||
|
||||
async pruneDiscoveryListings () {
|
||||
if (!this.discovery) return { removed: 0, ids: [] }
|
||||
const result = await this.discovery.pruneStaleListings()
|
||||
this.emit('discovery')
|
||||
return result
|
||||
}
|
||||
|
||||
async setGuildDiscoveryListing (guildId, listed) {
|
||||
if (!this.discovery) throw new Error('discovery unavailable')
|
||||
await this.discovery.setGuildPublicListing(guildId, listed)
|
||||
|
||||
Reference in New Issue
Block a user