Fix issue with author changing type

When cycling through the attributes of the data json 'author' within 'message' which was previously a user object is overwritten with a dictionary. This causes an AttributeError to be thrown ( and silently swallowed... thanks except: pass) whenever any of its attributes are referenced in the form message.author.x. User data should change in this step and the user object should not be modified for any reason so its safe to skip updating it.
This commit is contained in:
megamit 2015-09-02 23:07:36 +01:00
parent e60777e68b
commit 6a40a5da2e

View File

@ -244,7 +244,7 @@ class Client(object):
message = copy.deepcopy(older_message)
# update the new update
for attr in data:
if attr == 'channel_id':
if attr == 'channel_id' or attr == 'author':
continue
value = data[attr]
if 'time' in attr: