polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

Voice State object has no id field on ddc #430

Closed kozabrada123 closed 9 months ago

kozabrada123 commented 10 months ago

Chorus' Voice State object includes an id: Snowflake field (to derive Updateable), which only exists on Spacebar (VoiceState class on SB, BaseClass on SB vs VoiceState object on DDC and VoiceState object on Userdoccers)

This causes all Voice State Update events to fail to deserialize on DDC:

... Received message {"t":"VOICE_STATE_UPDATE","s":5,"op":0,"d":{"user_id":"1234567890","suppress":false,"session_id":"s3cr37s35510n1d","self_video":false,"self_mute":false,"self_deaf":false,"request_to_speak_timestamp":null,"mute":false,"guild_id":null,"deaf":false,"channel_id":"1234567890"}}
... Gateway: Received VOICE_STATE_UPDATE
... Failed to parse gateway event VOICE_STATE_UPDATE (missing field `id` at line 1 column 262)

A solution could be to generate a custom snowflake id when it is not given somehow from the other given ids

kozabrada123 commented 9 months ago

Closed by #440