Skip to content

Commit

Permalink
✨ Add STATUS APPENDLIMIT (RFC7889, APPENDLIMIT) [🚧 WIP: tests, docs]
Browse files Browse the repository at this point in the history
Previously, any number-type status values worked—which is most of them.
This adds support for `APPENDLIMIT`, which can also be `NIL`.
  • Loading branch information
nevans committed Nov 8, 2024
1 parent ea47e34 commit db704c3
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lib/net/imap/response_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -543,17 +543,10 @@ def resp_cond_state__name
end

# nstring = string / nil
def nstring
NIL? ? nil : string
end

def nstring8
NIL? ? nil : string8
end

def nquoted
NIL? ? nil : quoted
end
def nstring; NIL? ? nil : string end
def nstring8; NIL? ? nil : string8 end
def nquoted; NIL? ? nil : quoted end
def nil_or_number; NIL? ? nil : number end

# use where nstring represents "LABEL" values
def case_insensitive__nstring
Expand Down Expand Up @@ -1590,6 +1583,7 @@ def status_att_val
when "SIZE" then number64 # RFC8483, RFC9051
when "HIGHESTMODSEQ" then mod_sequence_valzer # RFC7162
when "MAILBOXID" then parens__objectid # RFC8474
when "APPENDLIMIT" then nil_or_number # RFC7889
else
number? || ExtensionData.new(tagged_ext_val)
end
Expand Down

0 comments on commit db704c3

Please sign in to comment.