feat(guild): EMOJI_UPSERT gossip emit and simulateGossip handler
Guild mesh now fans out custom emoji rows to peers and supports deterministic smoke injection for EMOJI_UPSERT payloads. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -305,6 +305,9 @@ class PearcordGuild extends EventEmitter {
|
||||
if (method === RPC.SLASH_COMMAND_UPSERT) {
|
||||
this.emit('slash-command', payload)
|
||||
}
|
||||
if (method === RPC.EMOJI_UPSERT) {
|
||||
this.emit('guild-emoji', payload)
|
||||
}
|
||||
if (method === RPC.BOT_EVENT) {
|
||||
this.emit('bot-event', payload)
|
||||
}
|
||||
@@ -329,6 +332,10 @@ class PearcordGuild extends EventEmitter {
|
||||
await this.ingestChannel(payload).catch(() => {})
|
||||
return
|
||||
}
|
||||
if (method === RPC.EMOJI_UPSERT) {
|
||||
this.emit('guild-emoji', payload)
|
||||
return
|
||||
}
|
||||
this._onGossip(method, payload, { remotePublicKey: b4a.alloc(32) })
|
||||
}
|
||||
|
||||
@@ -412,6 +419,10 @@ class PearcordGuild extends EventEmitter {
|
||||
broadcastGossip(this, RPC.SLASH_COMMAND_UPSERT, row)
|
||||
}
|
||||
|
||||
gossipEmojiUpsert (row) {
|
||||
broadcastGossip(this, RPC.EMOJI_UPSERT, row)
|
||||
}
|
||||
|
||||
gossipBotEvent (payload) {
|
||||
broadcastGossip(this, RPC.BOT_EVENT, payload)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user