imap metadata extension: allow keys in the /shared/ namespace too

not just /private. /shared/ is the more commonly implemented namespace, because
it is easier te implement: you don't need per-user/account storage of metadata.
i initially approached it from the other direction: we don't have a mechanism
to share metadata with other accounts, so everything is private, and i assumed
that would be what a user would prefer. but email clients make the decisions,
and they'll likely try the /shared/ namespace.
This commit is contained in:
Mechiel Lukkien
2025-02-23 20:19:07 +01:00
parent 463e801909
commit 2809136451
3 changed files with 17 additions and 12 deletions

View File

@ -229,8 +229,8 @@ type Annotation struct {
// Can be zero, indicates global (per-account) annotation.
MailboxID int64 `bstore:"ref Mailbox,unique MailboxID+Key"`
// "Entry name", always starts with "/private/". Stored lower-case, comparisons
// must be done case-insensitively.
// "Entry name", always starts with "/private/" or "/shared/". Stored lower-case,
// comparisons must be done case-insensitively.
Key string `bstore:"nonzero"`
IsString bool // If true, the value is a string instead of bytes.