Browse Source

Fixed Bug when receiving Audio or Video-Messages

yowsup-2
Nico 5 years ago
parent
commit
ce70a912dd
  1. 5
      transWhat/session.py

5
transWhat/session.py

@ -325,6 +325,7 @@ class Session(YowsupApp):
self.logger.debug('Received %s message: %s' % (type, media))
buddy = media._from.split('@')[0]
participant = media.participant
caption = ''
if media.isEncrypted():
self.logger.debug('Received encrypted media message')
@ -341,6 +342,9 @@ class Session(YowsupApp):
else:
url = media.url
if type == 'image':
caption = media.caption
if participant is not None: # Group message
partname = participant.split('@')[0]
if media._from.split('@')[1] == 'broadcast': # Broadcast message
@ -353,6 +357,7 @@ class Session(YowsupApp):
else:
self.sendMessageToXMPP(buddy, url, media.timestamp)
self.sendMessageToXMPP(buddy, media.caption, media.timestamp)
self.sendReceipt(media._id, media._from, None, media.participant)
self.recvMsgIDs.append((media._id, media._from, media.participant, media.timestamp))

Loading…
Cancel
Save