update
This commit is contained in:
@@ -112,8 +112,9 @@ def graphql_to_attachment(a):
|
||||
elif _type == 'MessageAudio':
|
||||
return AudioAttachment(
|
||||
filename=a.get('filename'),
|
||||
playable_url=a.get('playable_url'),
|
||||
duration=a.get('playable_duration_in_ms')
|
||||
url=a.get('playable_url'),
|
||||
duration=a.get('playable_duration_in_ms'),
|
||||
audio_type=a.get('audio_type')
|
||||
)
|
||||
elif _type == 'MessageFile':
|
||||
return FileAttachment(
|
||||
|
@@ -268,18 +268,18 @@ class FileAttachment(Attachment):
|
||||
self.is_malicious = is_malicious
|
||||
|
||||
class AudioAttachment(Attachment):
|
||||
# Name of the file
|
||||
#: Name of the file
|
||||
filename = None
|
||||
# playable_url
|
||||
playable_url = None
|
||||
# duration
|
||||
#: playable_url
|
||||
url = None
|
||||
#: Duration of the audioclip in milliseconds
|
||||
duration = None
|
||||
|
||||
def __init__(self, filename=None, playable_url=None, duration=None, **kwargs):
|
||||
def __init__(self, filename=None, url=None, duration=None, **kwargs):
|
||||
"""Represents an audio file that has been sent as a Facebook attachment"""
|
||||
super(AudioAttachment, self).__init__(**kwargs)
|
||||
self.filename = filename
|
||||
self.playable_url = playable_url
|
||||
self.url = url
|
||||
self.duration = duration
|
||||
|
||||
class ImageAttachment(Attachment):
|
||||
|
Reference in New Issue
Block a user