Commit 17a3edbb authored by Nicolas Delaby's avatar Nicolas Delaby

Restore Message-ID as source_reference, there is no need to

return Message-ID when asking for filename.
So filename and source_reference can co exists without collision.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41124 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4acb001
......@@ -340,16 +340,17 @@ class EmailDocument(TextDocument):
return result
return self.getFilename(*args)
security.declareProtected(Permissions.AccessContentsInformation, 'getFilename')
def getFilename(self, *args):
security.declareProtected(Permissions.AccessContentsInformation,
'getSourceReference')
def getSourceReference(self, *args):
"""
The Message-ID is considered here as the source reference
of the message on the sender side (source)
"""
if not self.hasData():
return self._baseGetFilename(*args)
return self._baseGetSourceReference(*args)
if not len(args):
args = (self._baseGetFilename(),)
args = (self._baseGetSourceReference(),)
content_information = self.getContentInformation()
return content_information.get('Message-ID') or content_information.get('Message-Id', *args)
......
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