Store Message-ID with <> brackets
This commit is contained in:
parent
86a09b637f
commit
4a7808de48
1 changed files with 2 additions and 4 deletions
|
@ -47,8 +47,7 @@ class Message(DatabaseTable):
|
|||
'content'
|
||||
)
|
||||
|
||||
RE_HEADER = re.compile(r'^([A-Za-z0-9\-]+): (.*)$')
|
||||
RE_MESSAGE_ID = re.compile(r'^<([^<>]+)>$')
|
||||
RE_HEADER = re.compile(r'^([A-Za-z0-9\-]+): (.*)$')
|
||||
|
||||
def __init__(self):
|
||||
self.id = None
|
||||
|
@ -110,9 +109,8 @@ class Message(DatabaseTable):
|
|||
return self.headers.get(key.lower())
|
||||
|
||||
def unique_id(self) -> str:
|
||||
match = self.RE_MESSAGE_ID.match(self.header('Message-ID'))
|
||||
return self.header('Message-ID')
|
||||
|
||||
return match[1]
|
||||
|
||||
def date(self):
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue