diff --git a/lib/nntp/tiny/message.py b/lib/nntp/tiny/message.py index b5d0cf7..563f11c 100644 --- a/lib/nntp/tiny/message.py +++ b/lib/nntp/tiny/message.py @@ -65,6 +65,11 @@ class Message(): def header(self, key: str): return self.headers.get(key.lower()) + def id(self) -> str: + match = self.RE_MESSAGE_ID.match(self.header('Message-ID')) + + return match[1] + def date(self): try: return search_dates(self.headers['date'])[0][1]