Skip to content

Commit 9e7afe1

Browse files
committed
📚 Document UIDPLUS commands, response codes, data
* Link to UIDPlusData for commands that can return it: `#append`, `#copy`, and `#move` * Update `#uid_expunge` to avoid "UID set", which has slightly different semantics from "sequence set of UIDs".
1 parent 50bf73b commit 9e7afe1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lib/net/imap.rb

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,10 @@ def status(mailbox, attr)
10051005
# ===== Capabilities
10061006
#
10071007
# If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
1008-
# supported, the server's response should include a +APPENDUID+ response
1009-
# code with the UIDVALIDITY of the destination mailbox and the assigned UID
1010-
# of the appended message.
1008+
# supported and the destination supports persistent UIDs, the server's
1009+
# response should include an +APPENDUID+ response code with UIDPlusData.
1010+
# This will report the UIDVALIDITY of the destination mailbox and the
1011+
# assigned UID of the appended message.
10111012
#
10121013
#--
10131014
# TODO: add MULTIAPPEND support
@@ -1074,7 +1075,7 @@ def expunge
10741075
#
10751076
# *Note:*
10761077
# >>>
1077-
# Although the command takes a +uid_set+ for its argument, the
1078+
# Although the command takes a set of UIDs for its argument, the
10781079
# server still returns regular EXPUNGE responses, which contain
10791080
# a <em>sequence number</em>. These will be deleted from
10801081
# #responses and this method returns them as an array of
@@ -1222,8 +1223,9 @@ def uid_store(set, attr, flags)
12221223
#
12231224
# If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
12241225
# supported, the server's response should include a +COPYUID+ response code
1225-
# with the UIDVALIDITY of the destination mailbox, the UID set of the source
1226-
# messages, and the assigned UID set of the moved messages.
1226+
# with UIDPlusData. This will report the UIDVALIDITY of the destination
1227+
# mailbox, the UID set of the source messages, and the assigned UID set of
1228+
# the moved messages.
12271229
def copy(set, mailbox)
12281230
copy_internal("COPY", set, mailbox)
12291231
end
@@ -1248,9 +1250,10 @@ def uid_copy(set, mailbox)
12481250
# [RFC6851[https://tools.ietf.org/html/rfc6851]].
12491251
#
12501252
# If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
1251-
# also supported, the server's response should include a +COPYUID+ response
1252-
# code with the UIDVALIDITY of the destination mailbox, the UID set of the
1253-
# source messages, and the assigned UID set of the moved messages.
1253+
# supported, the server's response should include a +COPYUID+ response code
1254+
# with UIDPlusData. This will report the UIDVALIDITY of the destination
1255+
# mailbox, the UID set of the source messages, and the assigned UID set of
1256+
# the moved messages.
12541257
#
12551258
def move(set, mailbox)
12561259
copy_internal("MOVE", set, mailbox)

0 commit comments

Comments
 (0)