Pop-out messageID format into constants

This commit is contained in:
Pavel Škoda
2020-05-11 16:17:59 +02:00
committed by Pavel Škoda
parent 30425d5fcd
commit 70fca64a36
5 changed files with 21 additions and 12 deletions

View File

@ -141,6 +141,15 @@ const (
// Due to API limitations, we shouldn't make requests with more than 100 message IDs at a time.
const messageIDPageSize = 100
// ConversationIDDomain is used as a placeholder for conversation reference headers to improve compatibility with various clients
const ConversationIDDomain = `protonmail.conversationid`
// InternalIDDomain is used as a placeholder for reference/message ID headers to improve compatibility with various clients
const InternalIDDomain = `protonmail.internalid`
// InternalReferenceFormat describes format of the message ID (as regex) used for parsing reference headers
const InternalReferenceFormat = `(?U)<.*@` + InternalIDDomain + `>`
// Message structure.
type Message struct {
ID string `json:",omitempty"`