Commit 9a6b3c7b authored by Saul Ibarra's avatar Saul Ibarra

Don't play the hangup tone for sessions without audio and/or video

parent 710e68b2
...@@ -4171,7 +4171,7 @@ class SessionManager(object): ...@@ -4171,7 +4171,7 @@ class SessionManager(object):
if new_state in ('connecting/ringing', 'connecting/early_media', 'connected/*'): if new_state in ('connecting/ringing', 'connecting/early_media', 'connected/*'):
self.update_ringtone() self.update_ringtone()
elif new_state == 'ending': elif new_state == 'ending':
notification.sender._play_hangup_tone = notification.data.old_state in ('connecting/*', 'connected/*') notification.sender._play_hangup_tone = notification.data.old_state in ('connecting/*', 'connected/*') and notification.sender.streams.types.intersection({'audio', 'video'})
def _NH_BlinkSessionDidChangeHoldState(self, notification): def _NH_BlinkSessionDidChangeHoldState(self, notification):
if notification.data.remote_hold and not notification.data.local_hold: if notification.data.remote_hold and not notification.data.local_hold:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment