mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 02:46:37 +03:00
imapserver: implement rfc 9590, returning metadata in the extended list command
only with "return" including "metadata". so clients can quickly get certain metadata (eg for display, such as a color) for mailboxes. this also adds a protocol token type "mailboxt" that properly encodes to utf7 if required.
This commit is contained in:
@ -460,11 +460,14 @@ func (c *Conn) xuntagged() Untagged {
|
||||
var isString bool
|
||||
if c.take('~') {
|
||||
value = c.xliteral()
|
||||
} else {
|
||||
} else if c.peek('"') {
|
||||
value = []byte(c.xstring())
|
||||
isString = true
|
||||
// note: the abnf also allows nstring, but that only makes sense when the
|
||||
// production rule is used in the setmetadata command. ../rfc/5464:831
|
||||
} else {
|
||||
// For response to extended list.
|
||||
c.xtake("nil")
|
||||
}
|
||||
r.Annotations = append(r.Annotations, Annotation{key, isString, value})
|
||||
|
||||
|
Reference in New Issue
Block a user