The notion of "Me"
As of 0.4, the item which represents 'the user' is an
EmailAddress item, determined by doing a Kind Query on IMAPAccount, taking the first resulting item, and using it's 'replyToAddress' value. Although the IMAP layer can handle multiple IMAP accounts, the layers 'above' it -- including the content model, UI, and the accounts dialog -- don't currently support more than one account.
Proposal
- Use a Contact item to represent the user. It's open for debate whether a single person would have multiple Contact items repsenting him/her; for 0.5 we could just support a single Contact-to-person relationship.
- Rather than doing full-blown contact management, we simplify the Contact Kind, removing all the unused attributes, and adding the following attributes:
- 'IMAPAccounts' -- a ref collection of all IMAP accounts for this person
- 'SMTPAccounts' -- a ref collection of all SMTP accounts for this person
- 'WebDAVAccounts' -- a ref collection of all WebDAV accounts for this person
- We have some way to specify which Contact item represents the user. It could be that it resides at a specific repository path (or when we have the new addressing scheme, the item could live at a certain address).
- When we send mail or publish a collection, the UI must provide some way to choose which IMAP or WebDAV account to use. There is already a reference from IMAPAccount to SMTPAccount (via the 'defaultSMTPAccount' attribute)
- The accounts dialog allows creating/deleting/managing multiple accounts
- We change the existing logic that determines "what is the current 'me' email address", since a user will have multiple email addresses. The question needs to be rephrased as "what is the current 'me' Contact item?" and all code modified accordingly.
--
MorgenSagen - 25 Oct 2004