feat(guild): gossip STICKER_UPSERT on guild mesh
Handle RPC 49 inbound gossip, emit guild-sticker events, and expose gossipStickerUpsert for moderators uploading animated stickers.
This commit is contained in:
@@ -374,6 +374,9 @@ class PearcordGuild extends EventEmitter {
|
||||
if (method === RPC.GUILD_BOOST_UPDATE) {
|
||||
this.emit('guild-boost', payload)
|
||||
}
|
||||
if (method === RPC.STICKER_UPSERT) {
|
||||
this.emit('guild-sticker', payload)
|
||||
}
|
||||
}
|
||||
|
||||
/** Deterministic gossip injection for Bare smokes (no live mesh). */
|
||||
@@ -394,6 +397,10 @@ class PearcordGuild extends EventEmitter {
|
||||
this.emit('guild-emoji', payload)
|
||||
return
|
||||
}
|
||||
if (method === RPC.STICKER_UPSERT) {
|
||||
this.emit('guild-sticker', payload)
|
||||
return
|
||||
}
|
||||
this._onGossip(method, payload, { remotePublicKey: b4a.alloc(32) })
|
||||
}
|
||||
|
||||
@@ -529,6 +536,10 @@ class PearcordGuild extends EventEmitter {
|
||||
broadcastGossip(this, RPC.GUILD_BOOST_UPDATE, payload)
|
||||
}
|
||||
|
||||
gossipStickerUpsert (row) {
|
||||
broadcastGossip(this, RPC.STICKER_UPSERT, row)
|
||||
}
|
||||
|
||||
sendScreenMedia (msg) {
|
||||
broadcastScreenMedia(this, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user