MateriiApps / OpenCord

An open-source Material You implementation of the Discord Android app
GNU General Public License v3.0
1.24k stars 98 forks source link

Fix snowflakes #54

Closed X1nto closed 2 years ago

X1nto commented 2 years ago

Because of how fucking stupid Discord is, some users reported that sometimes snowflakes contain negative values (which, should NEVER happen). Using ULongs crashes the HTTP client as it does not expect a negative value when serializing.

rushiiMachine commented 2 years ago

afaik the negative ids happen on guild folders only

X1nto commented 2 years ago

afaik the negative ids happen on guild folders only

Honestly, still, no reason to really keep ULongs. The Snowflake max size is Long.MAX_VALUE anyway, so it's not like we're losing numbers when using signed instead of unsigned