Version up thanks to @enwar3

This commit is contained in:
Mads Marquart
2017-06-29 16:03:55 +02:00
parent 92a5ffdef8
commit 0d5e4f6d3f
2 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ from .client import *
__copyright__ = 'Copyright 2015 - {} by Taehoon Kim'.format(datetime.now().year)
__version__ = '1.0.9'
__version__ = '1.0.10'
__license__ = 'BSD'
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
__email__ = 'carpedm20@gmail.com'

View File

@@ -71,6 +71,9 @@ class Client(object):
# If session cookies aren't set, not properly loaded or gives us an invalid session, then do the login
if not session_cookies or not self.setSession(session_cookies) or not self.isLoggedIn():
self.login(email, password, max_tries)
else:
self.email = email
self.password = password
"""
INTERNAL REQUEST METHODS
@@ -736,10 +739,9 @@ class Client(object):
if k['thread_type'] == 1:
if k['other_user_fbid'] not in participants:
raise Exception('A thread was not in participants: {}'.format(j['payload']))
participants[k['other_user_fbid']].last_message_timestamp = k['last_message_timestamp']
entries.append(participants[k['other_user_fbid']])
elif k['thread_type'] == 2:
entries.append(Group(k['thread_fbid'], participants=set([p.strip('fbid:') for p in k['participants']]), photo=k['image_src'], name=k['name'], last_message_timestamp=k['last_message_timestamp']))
entries.append(Group(k['thread_fbid'], participants=set([p.strip('fbid:') for p in k['participants']]), photo=k['image_src'], name=k['name']))
else:
raise Exception('A thread had an unknown thread type: {}'.format(k))