send a session-terminate at the end of a jingle filetransfer
This commit is contained in:
parent
6911821a28
commit
f03cdbbebf
|
@ -1407,11 +1407,18 @@ class Interface:
|
||||||
if 'stalled' in file_props and file_props['stalled'] or \
|
if 'stalled' in file_props and file_props['stalled'] or \
|
||||||
'paused' in file_props and file_props['paused']:
|
'paused' in file_props and file_props['paused']:
|
||||||
return
|
return
|
||||||
|
|
||||||
if file_props['type'] == 'r': # we receive a file
|
if file_props['type'] == 'r': # we receive a file
|
||||||
jid = unicode(file_props['sender'])
|
jid = unicode(file_props['sender'])
|
||||||
else: # we send a file
|
else: # we send a file
|
||||||
jid = unicode(file_props['receiver'])
|
jid = unicode(file_props['receiver'])
|
||||||
|
|
||||||
|
# End jingle session
|
||||||
|
if file_props['session-type'] == 'jingle' and file_props['type'] == 'r':
|
||||||
|
session = gajim.connections[account].get_jingle_session(jid,
|
||||||
|
sid=file_props['session-sid'])
|
||||||
|
session.end_session()
|
||||||
|
|
||||||
if helpers.allow_popup_window(account):
|
if helpers.allow_popup_window(account):
|
||||||
if file_props['error'] == 0:
|
if file_props['error'] == 0:
|
||||||
if gajim.config.get('notify_on_file_complete'):
|
if gajim.config.get('notify_on_file_complete'):
|
||||||
|
|
Loading…
Reference in New Issue