Commit 9f65bca3 authored by Philipp Hörist's avatar Philipp Hörist

Remove traces of forwarding messages (XEP-0146)

This is deprecated because its very insecure and also not needed
anymore because of MAM
parent 54b5dec6
......@@ -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
......
......@@ -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
......
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