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:
@ -1216,6 +1216,7 @@ class Message(Hashable):
|
||||
# To check for the view afterwards
|
||||
view = None
|
||||
else:
|
||||
self._state.prevent_view_updates_for(self.id)
|
||||
if view:
|
||||
fields['components'] = view.to_components()
|
||||
else:
|
||||
@ -1687,6 +1688,7 @@ class PartialMessage(Hashable):
|
||||
# To check for the view afterwards
|
||||
view = None
|
||||
else:
|
||||
self._state.prevent_view_updates_for(self.id)
|
||||
if view:
|
||||
fields['components'] = view.to_components()
|
||||
else:
|
||||
|
Reference in New Issue
Block a user