server
server copied to clipboard
Fix issues with certain mobile clients
This PR fixes various issues that prevent mobile clients from connecting properly.
This has been tested with OpenCord and a patched version of the official Discord app.
Notable Changes:
- [Message]
edited_timestampshould return null instead of undefined as OC expects it to be present on the object - [API] Added GET
/users/@me/settings - [Channel] Made NSFW not nullable. ~~It's a boolean... why would it be null...~~
- [User] Added
purchased_flagsandpremium_usage_flags - [User] Made
mfa_enablednot nullable. ~~It's also a boolean... why would it be null...~~ - [UserSettings] Added
friend_discovery_flags,view_nsfw_guilds,passwordless, andbanner_color - [Gateway] Added empty
sessionsandpresencesarray to Ready payload - [Gateway] Updated identify payload schema with properties sent by the android clients
- [Message] Disabled stripping null values (this is so
edited_timestampis actually returned, but this may cause an issue with bot clients apparently) - [API] GET
/channels/:id/messages- Member object returns the members role ids - [Gateway] Replaced Node Built-in zlib library with
fast-zlibas the built-in one wasn't working correctly - [Gateway] Implemented zlib inflation
- [Gateway] Updated LazyRequest to accept
guild_idas a string or a number. (Mobile clients send it as a number) - [Gateway] Updated VoiceStateUpdate to accept
guild_idandchannel_idas a string or a number. (Mobile clients send it as a number)
Current Known Issues:
- There is an issue with
premiumwhere it looks like it's an object created frompremium_typewhich causes issues with OpenCord since it expects a number. probably not a big deal
- ~~Member List is empty on mobile due to guild id being sent as a bigint and incorrectly parsed on the server~~ Fixed, thanks to maddy
is the last issue with premium_type much of an problem or could we start reviewing? only seems to affect opencord, official discord app works fine
Looks good to me, is that premium thing still an issue? Where does this occur, gateway or api? Is this ready for merging otherwise?
It's still an issue, I tested with fosscord staging
Afaik it's just the gateway. it only seems to cause issues for opencord so other than that, it should be ready for merge
Closing as the PR is now outdated, refactor already contains stuff from from PR.