handle correctly forwarded messages. fixes #4246
This commit is contained in:
parent
269e5a31c7
commit
a0e9a0d905
|
@ -1641,8 +1641,6 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
'''Called when we receive a message'''
|
'''Called when we receive a message'''
|
||||||
gajim.log.debug('MessageCB')
|
gajim.log.debug('MessageCB')
|
||||||
|
|
||||||
frm = helpers.get_full_jid_from_iq(msg)
|
|
||||||
|
|
||||||
# check if the message is pubsub#event
|
# check if the message is pubsub#event
|
||||||
if msg.getTag('event') is not None:
|
if msg.getTag('event') is not None:
|
||||||
if msg.getTag('error') is None:
|
if msg.getTag('error') is None:
|
||||||
|
@ -1654,6 +1652,18 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
self._HttpAuthCB(con, msg)
|
self._HttpAuthCB(con, msg)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
frm = helpers.get_full_jid_from_iq(msg)
|
||||||
|
jid = helpers.get_jid_from_iq(msg)
|
||||||
|
|
||||||
|
addressTag = msg.getTag('addresses', namespace = common.xmpp.NS_ADDRESS)
|
||||||
|
|
||||||
|
# Be sure it comes from one of our resource, else ignore address element
|
||||||
|
if addressTag and jid == gajim.get_jid_from_account(self.name):
|
||||||
|
address = addressTag.getTag('address', attrs={'type': 'ofrom'})
|
||||||
|
if address:
|
||||||
|
frm = address.getAttr('jid')
|
||||||
|
jid = gajim.get_jid_without_resource(frm)
|
||||||
|
|
||||||
# invitations
|
# invitations
|
||||||
invite = None
|
invite = None
|
||||||
encTag = msg.getTag('x', namespace=common.xmpp.NS_ENCRYPTED)
|
encTag = msg.getTag('x', namespace=common.xmpp.NS_ENCRYPTED)
|
||||||
|
@ -1685,8 +1695,6 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
|
|
||||||
msgtxt = msg.getBody()
|
msgtxt = msg.getBody()
|
||||||
|
|
||||||
jid = helpers.get_jid_from_iq(msg)
|
|
||||||
|
|
||||||
encrypted = False
|
encrypted = False
|
||||||
xep_200_encrypted = msg.getTag('c', namespace=common.xmpp.NS_STANZA_CRYPTO)
|
xep_200_encrypted = msg.getTag('c', namespace=common.xmpp.NS_STANZA_CRYPTO)
|
||||||
|
|
||||||
|
@ -1765,15 +1773,6 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
session.control.conv_textview.hide_xep0184_warning(
|
session.control.conv_textview.hide_xep0184_warning(
|
||||||
msg.getID())
|
msg.getID())
|
||||||
|
|
||||||
addressTag = msg.getTag('addresses', namespace = common.xmpp.NS_ADDRESS)
|
|
||||||
|
|
||||||
# Be sure it comes from one of our resource, else ignore address element
|
|
||||||
if addressTag and jid == gajim.get_jid_from_account(self.name):
|
|
||||||
address = addressTag.getTag('address', attrs={'type': 'ofrom'})
|
|
||||||
if address:
|
|
||||||
frm = address.getAttr('jid')
|
|
||||||
jid = gajim.get_jid_without_resource(frm)
|
|
||||||
|
|
||||||
if encTag and self.USE_GPG:
|
if encTag and self.USE_GPG:
|
||||||
encmsg = encTag.getData()
|
encmsg = encTag.getData()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue