Commit 2c7d24ff authored by Dan Pascu's avatar Dan Pascu

Fixed conditions tested for displaying transfer status messages

parent daf057da
......@@ -2015,7 +2015,6 @@ class AudioSessionItem(object):
self._cleanup()
def _NH_BlinkSessionTransferNewOutgoing(self, notification):
if self.blink_session.state == 'connected':
self.status_context = 'transfer'
self.status = Status('Transfer: Trying', context='transfer')
......@@ -2024,14 +2023,14 @@ class AudioSessionItem(object):
self.status = Status('Transfer: Succeeded', context='transfer')
def _NH_BlinkSessionTransferDidFail(self, notification):
if self.blink_session.state == 'connected' and self.blink_session.transfer_direction == 'outgoing':
if self.blink_session.transfer_direction == 'outgoing':
reason = 'Decline' if notification.data.code == 603 else notification.data.reason
self.status = Status("Transfer: {}".format(reason), context='transfer')
call_later(3, self._reset_status, self.status)
self.status_context = None
def _NH_BlinkSessionTransferGotProgress(self, notification):
if self.blink_session.state == 'connected' and notification.data.code < 200: # final answers are handled in DidEnd and DiDFail
if notification.data.code < 200: # final answers are handled in DidEnd and DiDFail
self.status = Status("Transfer: {}".format(notification.data.reason), context='transfer')
def _NH_MediaStreamWillEnd(self, notification):
......
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