feat(mesh): guild-sync-ready channels on create/delete gossip (Phase 800)
Channel and channel-delete wire events emit structural channel slices for mesh peers. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
Application facade: one `PearcordPlatform` class that wires identity, database, guild mesh, DMs, invites, voice, discovery, bots, and dozens of feature modules for the Pearcord desktop sidecar and companion. **Mixin sources:** [`mixins/README.md`](mixins/README.md) — `domain/`, `json-export/`, `runtime/{core,mesh,guild-sync,search-discovery,partition-heal,view,voice-dm,features}/`. Architecture: [PLATFORM_MIXINS.md](../../docs/PLATFORM_MIXINS.md). Regenerate after manifest edits: `cd apps/pearcord && npm run regenerate:platform-mixins`. OTA prestage recursively verifies symbols under `mixins/` — [RELEASE.md](../../docs/RELEASE.md#prestage-sync-file-deps).
|
||||
|
||||
**Phase 800 (v0.8.767):** `guild-sync-ready` `channels` on channel create/delete gossip. Bundle: `npm run test:ci-phase800`.
|
||||
|
||||
**Phase 799 (v0.8.766):** Reuses Phase 794 channel-settings gossip + GUILD_SYNC slices for triple-peer slowmode. Bundle: `npm run test:ci-phase799`.
|
||||
|
||||
**Phase 797 (v0.8.764):** `guild-sync-ready` `channelTopic` on channel-update gossip. Bundle: `npm run test:ci-phase797`.
|
||||
|
||||
@@ -124,6 +124,8 @@ _wireGuild (guildInstance) {
|
||||
guildInstance.on('channel', (ch) => {
|
||||
this._fanoutBotEvent(BOT_EVENTS.CHANNEL_CREATE, { channel: ch })
|
||||
this.emit('channel', ch)
|
||||
const gid = this.guild?.guild?.id
|
||||
if (gid) this.emit('guild-sync-ready', { guildId: gid, channels: 1 })
|
||||
})
|
||||
guildInstance.on('channel-delete', (p) => {
|
||||
if (p?.channelId && p.channelId === this.activeChannelId) {
|
||||
@@ -135,6 +137,8 @@ _wireGuild (guildInstance) {
|
||||
})
|
||||
}
|
||||
this.emit('channel-delete', p)
|
||||
const gid = this.guild?.guild?.id
|
||||
if (gid) this.emit('guild-sync-ready', { guildId: gid, channels: 1 })
|
||||
})
|
||||
guildInstance.on('pin', (p) => {
|
||||
this.emit('pin', p)
|
||||
|
||||
Reference in New Issue
Block a user