From 846d8c7aa8ac3449b5c919944c567ba269379987 Mon Sep 17 00:00:00 2001 From: nicholas evans Date: Mon, 23 Oct 2023 00:10:56 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20fetch=20support=20for=20`EMAI?= =?UTF-8?q?LID`=20and=20`THREADID`=20[=F0=9F=9A=A7=20tests]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are the `msg-att` added by the `OBJECTID` extension. --- lib/net/imap/response_parser.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/net/imap/response_parser.rb b/lib/net/imap/response_parser.rb index 063805bc..98e13da5 100644 --- a/lib/net/imap/response_parser.rb +++ b/lib/net/imap/response_parser.rb @@ -893,6 +893,8 @@ def msg_att(n) when "RFC822.HEADER" then nstring # not in rev2 when "RFC822.TEXT" then nstring # not in rev2 when "MODSEQ" then parens__modseq # CONDSTORE + when "EMAILID" then parens__objectid # OBJECTID TODO:tests + when "THREADID" then nparens__objectid # OBJECTID TODO:tests when "X-GM-MSGID" then x_gm_id # GMail when "X-GM-THRID" then x_gm_id # GMail when "X-GM-LABELS" then x_gm_labels # GMail @@ -1976,6 +1978,15 @@ def charset; quoted? || atom end def parens__modseq; lpar; _ = permsg_modsequence; rpar; _ end + # RFC8474: + # objectid = 1*255(ALPHA / DIGIT / "_" / "-") + # ; characters in object identifiers are case + # ; significant + alias objectid atom + + def parens__objectid; lpar; _ = objectid; rpar; _ end + def nparens__objectid; NIL? ? nil : parens__objectid end + # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): # uid-set = (uniqueid / uid-range) *("," uid-set) # uid-range = (uniqueid ":" uniqueid)