Update the unavailable guild's data when it becomes available.

This commit is contained in:
Rapptz 2016-01-21 07:00:39 -05:00
parent 99749a2798
commit 654001ba3e

View File

@ -235,6 +235,7 @@ class ConnectionState:
server = self._get_server(data.get('id')) server = self._get_server(data.get('id'))
if server is not None: if server is not None:
server.unavailable = False server.unavailable = False
server._from_data(data)
self.dispatch('server_available', server) self.dispatch('server_available', server)
return return
@ -242,9 +243,9 @@ class ConnectionState:
# joined a server with unavailable == True so.. # joined a server with unavailable == True so..
return return
# if we're at this point then it was probably # if we're at this point then it was probably
# unavailable during the READY event and is now # unavailable during the READY event and is now
# available, so it isn't in the cache... # available, so it isn't in the cache...
server = self._add_server_from_data(data) server = self._add_server_from_data(data)
self.dispatch('server_join', server) self.dispatch('server_join', server)