mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Ensure member key is not overwritten by author key in MESSAGE_UPDATE
This also coerces the older message to take the member data from the newer message so the types are not incompatible. Fix #5999
This commit is contained in:
1 parent
7a3a571e0a
commit
f174365d33
2 files changed
+17
-7
No files matched your search
@@ -526,6 +526,9 @@ class ConnectionState:
|
||||
raw.cached_message = older_message
|
||||
self.dispatch('raw_message_edit', raw)
|
||||
message._update(data)
|
||||
# Coerce the `after` parameter to take the new updated Member
|
||||
# ref: #5999
|
||||
older_message.author = message.author
|
||||
self.dispatch('message_edit', older_message, message)
|
||||
else:
|
||||
self.dispatch('raw_message_edit', raw)
|
||||
|
||||
Reference in new issue
Block a user