Skip to content

Commit 04768b2

Browse files
committed
[labeled-response] Note that attaching a label may sometimes not be feasible. Addresses #380
1 parent 7559b59 commit 04768b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/labeled-response.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This specification adds the `draft/label` message tag, which has a required valu
6060

6161
This tag MAY be sent by a client for any messages that need to be correlated with a response from the server.
6262

63-
For any message received from a client that includes this tag, the server MUST include the same tag and value in any response required from this message. Servers MUST include the tag in exactly one logical message.
63+
For any message received from a client that includes this tag, the server MUST include the same tag and value in any response required from this message where it is feasible to do so. Servers MUST include the tag in exactly one logical message.
6464

6565
If a response consists of more than one message, and the `batch` capability is enabled, a batch MUST be used to group them into a single logical response. The start of the batch MUST be tagged with the `draft/label` tag. The batch type MUST be one of:
6666

@@ -81,6 +81,8 @@ The tag value is chosen by the client and MUST be treated as an opaque identifie
8181

8282
This section is non-normative.
8383

84+
Bear in mind that in some cases, it might not be feasible for servers to attach a label to a message, for instance on certain remote or asynchronous actions. Handle these cases as normal for a server with no support for labeled responses.
85+
8486
In the case of `echo-message` (see example below), a client can use labeled responses to correlate a server's acknowledgment of their own messages with a temporary message displayed locally. The temporary message can be displayed to the user immediately in a pending state to reduce perceived lag, and then removed once a labeled response from the server is received.
8587

8688
When a client sends a private message to its own nick, `echo-message` will result in duplicate messages being sent by the server, as both sent and received messages. Labeled responses allow clients to deduplicate these messages in one of two ways:

0 commit comments

Comments
 (0)