Skip to content

Commit a82f790

Browse files
committed
✨ Update response-data w/stubs for extensions
Adds stubs (to be implemented later) for extension response-data: * ESEARCH - RFC4731, RFC9051, etc * VANISHED - RFC7162 * LISTRIGHTS - RFC4314 * MYRIGHTS - RFC4314 * LANGUAGE - RFC5255 * COMPARATOR - RFC5255 * CONVERTED - RFC5259 * METADATA - RFC5464 * UIDFETCH - (draft) UIDONLY extension I tried to cover _all_ extensions, but I might have missed a few... 😉
1 parent 5a92c75 commit a82f790

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/net/imap/response_parser.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,9 @@ def response_data
491491
when "FETCH" then message_data__fetch # RFC3501, RFC9051
492492
when "EXPUNGE" then message_data__expunge # RFC3501, RFC9051
493493
when "EXISTS" then mailbox_data__exists # RFC3501, RFC9051
494+
when "ESEARCH" then esearch_response # RFC4731, RFC9051, etc
495+
when "VANISHED" then expunged_resp # RFC7162
496+
when "UIDFETCH" then uidfetch_resp # (draft) UIDONLY
494497
when "SEARCH" then search_response # RFC3501 (obsolete)
495498
when "CAPABILITY" then capability_data__untagged # RFC3501, RFC9051
496499
when "FLAGS" then flags_response # RFC3501, RFC9051
@@ -509,6 +512,12 @@ def response_data
509512
when "QUOTAROOT" then getquotaroot_response # RFC2087, RFC9208
510513
when "ID" then id_response # RFC2971
511514
when "ACL" then getacl_response # RFC4314
515+
when "LISTRIGHTS" then listrights_data # RFC4314
516+
when "MYRIGHTS" then myrights_data # RFC4314
517+
when "METADATA" then metadata_resp # RFC5464
518+
when "LANGUAGE" then language_data # RFC5255
519+
when "COMPARATOR" then comparator_data # RFC5255
520+
when "CONVERTED" then message_data__converted # RFC5259
512521
when "LSUB" then list_response # RFC3501 (obsolete)
513522
when "XLIST" then list_response # deprecated
514523
when "NOOP" then ignored_response
@@ -532,6 +541,16 @@ def remaining_unparsed
532541

533542
def ignored_response; unparsed_response(IgnoredResponse) end
534543

544+
alias esearch_response unparsed_response
545+
alias expunged_resp unparsed_response
546+
alias uidfetch_resp unparsed_response
547+
alias listrights_data unparsed_response
548+
alias myrights_data unparsed_response
549+
alias metadata_resp unparsed_response
550+
alias language_data unparsed_response
551+
alias comparator_data unparsed_response
552+
alias message_data__converted unparsed_response
553+
535554
# RFC3501 & RFC9051:
536555
# response-tagged = tag SP resp-cond-state CRLF
537556
#

0 commit comments

Comments
 (0)