Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
32c72c2f35 | ||
|
42ae0035af | ||
|
96e28fdbe6 | ||
|
0f889f50cf |
@@ -27,4 +27,8 @@ Installation:
|
|||||||
|
|
||||||
$ pip install fbchat
|
$ pip install fbchat
|
||||||
|
|
||||||
Copyright 2015 - 2017 by Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`__
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
- Mads Marquart / `@madsmtm <https://github.com/madsmtm>`__
|
||||||
|
- Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`__
|
||||||
|
@@ -17,7 +17,7 @@ from .client import *
|
|||||||
|
|
||||||
|
|
||||||
__copyright__ = 'Copyright 2015 - {} by Taehoon Kim'.format(datetime.now().year)
|
__copyright__ = 'Copyright 2015 - {} by Taehoon Kim'.format(datetime.now().year)
|
||||||
__version__ = '1.1.1'
|
__version__ = '1.1.2'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
|
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
|
||||||
__email__ = 'carpedm20@gmail.com'
|
__email__ = 'carpedm20@gmail.com'
|
||||||
|
@@ -853,7 +853,7 @@ class Client(object):
|
|||||||
:raises: FBChatException if request failed
|
:raises: FBChatException if request failed
|
||||||
"""
|
"""
|
||||||
image_id = str(image_id)
|
image_id = str(image_id)
|
||||||
j = checkRequest(self._get(ReqUrl.ATTACHMENT_PHOTO, query={'photo_id': str(image_id)}))
|
j = check_request(self._get(ReqUrl.ATTACHMENT_PHOTO, query={'photo_id': str(image_id)}))
|
||||||
|
|
||||||
url = get_jsmods_require(j, 3)
|
url = get_jsmods_require(j, 3)
|
||||||
if url is None:
|
if url is None:
|
||||||
@@ -1485,14 +1485,15 @@ class Client(object):
|
|||||||
if mercury.get('attach_type'):
|
if mercury.get('attach_type'):
|
||||||
image_metadata = a.get('imageMetadata', {})
|
image_metadata = a.get('imageMetadata', {})
|
||||||
attach_type = mercury['attach_type']
|
attach_type = mercury['attach_type']
|
||||||
attachment = graphql_to_attachment(mercury.get('blob_attachment', {}))
|
if attach_type != 'share':
|
||||||
|
attachment = graphql_to_attachment(mercury.get('blob_attachment', {}))
|
||||||
|
else:
|
||||||
|
# TODO: Add more data here for shared stuff (URLs, events and so on)
|
||||||
|
pass
|
||||||
|
|
||||||
if attach_type == ['file', 'video']:
|
if attach_type == ['file', 'video']:
|
||||||
# TODO: Add more data here for audio files
|
# TODO: Add more data here for audio files
|
||||||
attachment.size = int(a['fileSize'])
|
attachment.size = int(a['fileSize'])
|
||||||
elif attach_type == 'share':
|
|
||||||
# TODO: Add more data here for shared stuff (URLs, events and so on)
|
|
||||||
pass
|
|
||||||
attachments.append(attachment)
|
attachments.append(attachment)
|
||||||
if a['mercury'].get('sticker_attachment'):
|
if a['mercury'].get('sticker_attachment'):
|
||||||
sticker = graphql_to_sticker(a['mercury']['sticker_attachment'])
|
sticker = graphql_to_sticker(a['mercury']['sticker_attachment'])
|
||||||
|
Reference in New Issue
Block a user