diff --git a/lib/nntp/tiny/message.py b/lib/nntp/tiny/message.py index 1d345ce..e949486 100644 --- a/lib/nntp/tiny/message.py +++ b/lib/nntp/tiny/message.py @@ -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: