From f5d9f8b5ec7aff16387008d478aad8cb22d954d0 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 30 Oct 2019 17:32:37 +0000 Subject: [PATCH] Match presence update's presence handling in guild members chunk --- disco/state.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/disco/state.py b/disco/state.py index 2ff3aab..05cfa97 100644 --- a/disco/state.py +++ b/disco/state.py @@ -336,10 +336,10 @@ class State(object): return for presence in event.presences: - if presence.user.id not in self.users: - self.users[presence.user.id] = presence.user - - self.users[presence.user.id].presence = presence + # TODO: this matches the recursive, hackfix method found in on_presence_update + user = presence.user + user.presence = presence + self.users[user.id].inplace_update(user) def on_guild_role_create(self, event): if event.guild_id not in self.guilds: