add initiator to every jingle stanza
This commit is contained in:
parent
d5ffbf8834
commit
af9d304c52
|
@ -630,10 +630,9 @@ class JingleSession(object):
|
||||||
stanza = xmpp.Iq(typ='set', to=xmpp.JID(self.peerjid),
|
stanza = xmpp.Iq(typ='set', to=xmpp.JID(self.peerjid),
|
||||||
frm=self.ourjid)
|
frm=self.ourjid)
|
||||||
attrs = {'action': action,
|
attrs = {'action': action,
|
||||||
'sid': self.sid}
|
'sid': self.sid,
|
||||||
if action == 'session-initiate' or action == 'session-accept' or \
|
'initiator' : self.initiator}
|
||||||
action == 'transport-replace' or action == 'transport-info':
|
|
||||||
attrs['initiator'] = self.initiator
|
|
||||||
jingle = stanza.addChild('jingle', attrs=attrs, namespace=xmpp.NS_JINGLE)
|
jingle = stanza.addChild('jingle', attrs=attrs, namespace=xmpp.NS_JINGLE)
|
||||||
if reason is not None:
|
if reason is not None:
|
||||||
jingle.addChild(node=reason)
|
jingle.addChild(node=reason)
|
||||||
|
|
Loading…
Reference in New Issue