l.s.m.m.message : module documentation

Part of lp.services.messages.model

No module docstring
Function utcdatetime_from_field Turn an RFC 2822 Date: header value into a Python datetime (UTC).
Class Message A message. This is an RFC822-style message, typically it would be
Function get_parent_msgids Returns a list of message ids the mail was a reply to.
Class MessageSet No class docstring; 0/1 class methods, 3/4 methods documented
Class MessageChunk One part of a possibly multipart Message
Class UserToUserEmail See IUserToUserEmail.
Class DirectEmailAuthorization See IDirectEmailAuthorization.
def utcdatetime_from_field(field_value):
Turn an RFC 2822 Date: header value into a Python datetime (UTC).
Parametersfield_valueThe value of the Date: header (type: string)
ReturnsThe corresponding datetime (UTC) (type: datetime.datetime)
RaisesInvalidEmailMessagewhen the date string cannot be converted.
def get_parent_msgids(parsed_message):

Returns a list of message ids the mail was a reply to.

>>> get_parent_msgids({'In-Reply-To': '<msgid1>'})
['<msgid1>']
>>> get_parent_msgids({'References': '<msgid1> <msgid2>'})
['<msgid1>', '<msgid2>']
>>> get_parent_msgids({'In-Reply-To': '<msgid1> <msgid2>'})
['<msgid1>', '<msgid2>']
>>> get_parent_msgids({'In-Reply-To': '', 'References': ''})
[]
>>> get_parent_msgids({})
[]
API Documentation for Launchpad, generated by pydoctor at 2018-05-26 00:00:07.