Fix of gateway mass updating
The goal of this MR is to fix mass user updating behaviour
Instead of sending an USER_UPDATE
event to all subscribed users, a GUILD_MEMBER_UPDATE
is sent to users in shared guilds, while PRESENCE_UPDATE
is used for no common guild users (friends).
I have tested this quite a bit and haven't found any problems. Presences and nicknames seem quite glitchy sometimes, although I believe that isn't related to this change.
One other thing I noticed is that leaving guilds would fail and sort of half-complete. This turned out to be a 1 line fix, however I am not 100% it is fully functional.
Notes:
*Currently all PRESENCE_UPDATE
events send the whole user object, as opposed to partial data. I don't think this is a trivial issue and should perhaps be resolved in the future.
EDIT:
I'm not exactly sure how lazy guilds work exactly, so I didn't touch that.