Changed name of the new on_message, to be properly backwards compatible

Apparently, python doesn't work the way i expected, when it comes to
overriding functions
This commit is contained in:
Mads Marquart
2017-02-07 20:36:43 +01:00
parent 8d34377419
commit fdb72e1f66

View File

@@ -760,7 +760,7 @@ class Client(object):
mid = m['delta']['messageMetadata']['messageId']
message = m['delta'].get('body','')
fbid = m['delta']['messageMetadata']['actorFbId']
self.on_message(mid, fbid, message, m, recipient_id, thread_type)
self.on_message_new(mid, fbid, message, m, recipient_id, thread_type)
elif m['type'] in ['jewel_requests_add']:
from_id = m['from']
self.on_friend_request(from_id)
@@ -878,7 +878,7 @@ class Client(object):
return r.ok
def on_message(self, mid, author_id, message, metadata, recipient_id, thread_type):
def on_message_new(self, mid, author_id, message, metadata, recipient_id, thread_type):
'''
subclass Client and override this method to add custom behavior on event