Skip to content

Commit 4e4da54

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 01c25d8 commit 4e4da54

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
@@ -1060,7 +1061,7 @@ def expunge
10601061
#
10611062
# *Note:*
10621063
# >>>
1063-
# Although the command takes a +uid_set+ for its argument, the
1064+
# Although the command takes a set of UIDs for its argument, the
10641065
# server still returns regular EXPUNGE responses, which contain
10651066
# a <em>sequence number</em>. These will be deleted from
10661067
# #responses and this method returns them as an array of
@@ -1208,8 +1209,9 @@ def uid_store(set, attr, flags)
12081209
#
12091210
# If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
12101211
# supported, the server's response should include a +COPYUID+ response code
1211-
# with the UIDVALIDITY of the destination mailbox, the UID set of the source
1212-
# messages, and the assigned UID set of the moved messages.
1212+
# with UIDPlusData. This will report the UIDVALIDITY of the destination
1213+
# mailbox, the UID set of the source messages, and the assigned UID set of
1214+
# the moved messages.
12131215
def copy(set, mailbox)
12141216
copy_internal("COPY", set, mailbox)
12151217
end
@@ -1234,9 +1236,10 @@ def uid_copy(set, mailbox)
12341236
# [RFC6851[https://tools.ietf.org/html/rfc6851]].
12351237
#
12361238
# If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
1237-
# also supported, the server's response should include a +COPYUID+ response
1238-
# code with the UIDVALIDITY of the destination mailbox, the UID set of the
1239-
# source messages, and the assigned UID set of the moved messages.
1239+
# supported, the server's response should include a +COPYUID+ response code
1240+
# with UIDPlusData. This will report the UIDVALIDITY of the destination
1241+
# mailbox, the UID set of the source messages, and the assigned UID set of
1242+
# the moved messages.
12401243
#
12411244
def move(set, mailbox)
12421245
copy_internal("MOVE", set, mailbox)

0 commit comments

Comments
 (0)