Remove view syncing before editing in views

This prevents a potential race condition when a MESSAGE_UPDATE is
received syncing and refreshing the view components causing a desync.
This commit is contained in:
Rapptz committed 2021-05-31 05:50:40 -04:00
1 parent 4a3491cc0a
commit d0097c4281
5 files changed
+19 -6

No files matched your search

+3
View File
@@ -284,6 +284,9 @@ class ConnectionState:
def store_view(self, view, message_id=None):
self._view_store.add_view(view, message_id)
def prevent_view_updates_for(self, message_id):
return self._view_store.remove_message_tracking(message_id)
@property
def guilds(self):
return list(self._guilds.values())