Remove traces of forwarding messages (XEP-0146)

This is deprecated because its very insecure and also not needed
anymore because of MAM
This commit is contained in:
Philipp Hörist 2018-07-19 17:38:25 +02:00
parent 54b5dec6c7
commit 9f65bca3d3
2 changed files with 0 additions and 24 deletions

View File

@ -346,12 +346,6 @@ class CommonConnection:
if obj.message and request:
msg_iq.setTag('request', namespace=nbxmpp.NS_RECEIPTS)
if obj.forward_from:
addresses = msg_iq.addChild('addresses',
namespace=nbxmpp.NS_ADDRESS)
addresses.addChild('address', attrs = {'type': 'ofrom',
'jid': obj.forward_from})
if obj.session:
# XEP-0201
obj.session.last_send = time.time()
@ -375,9 +369,6 @@ class CommonConnection:
if not obj.is_loggable:
return
if obj.forward_from:
return
if obj.session and not obj.session.is_loggable():
return

View File

@ -683,20 +683,6 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
groupchat=type_ == 'groupchat'):
return
address_tag = self.stanza.getTag('addresses',
namespace=nbxmpp.NS_ADDRESS)
# Be sure it comes from one of our resource, else ignore address element
if address_tag and self.jid == app.get_jid_from_account(account):
address = address_tag.getTag('address', attrs={'type': 'ofrom'})
if address:
try:
self.fjid = helpers.parse_jid(address.getAttr('jid'))
except helpers.InvalidFormat:
log.warning('Invalid JID: %s, ignoring it',
address.getAttr('jid'))
return
self.jid = app.get_jid_without_resource(self.fjid)
self.thread_id = self.stanza.getThread()
self.mtype = self.stanza.getType()
if not self.mtype or self.mtype not in ('chat', 'groupchat', 'error'):
@ -1921,7 +1907,6 @@ class MessageOutgoingEvent(nec.NetworkOutgoingEvent):
self.xhtml = None
self.label = None
self.session = None
self.forward_from = None
self.form_node = None
self.delayed = None
self.callback = None