You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Notes for implementing work-in-progress version
@@ -36,10 +40,22 @@ Full support for this extension requires support for the [`batch`][batch], [`ser
36
40
37
41
The `draft/chathistory` capability MUST be negotiated. This allows the server and client to behave differently when history is available and can be queried. In particular, if a client requests this capability, the server (or bouncer) SHOULD NOT play back any history that would otherwise be sent automatically.
38
42
39
-
An ISUPPORT token MUST be sent to the client to state the maximum number of messages a client can request in a single command, e.g., `CHATHISTORY=50`. If `0`, the client SHOULD assume that there is no maximum number of messages.
40
-
41
43
The `draft/event-playback` capability MAY be negotiated. This allows the client to signal that it is capable of receiving and correctly processing lines that would normally produce a local state change (such as `JOIN` or `MODE`) in its history batches.
42
44
45
+
### ISUPPORT tokens
46
+
47
+
This specification defines two ISUPPORT tokens.
48
+
49
+
`CHATHISTORY` MUST be sent to the client to state the maximum number of messages a client can request in a single command, e.g., `CHATHISTORY=50`. If `0`, the client SHOULD assume that there is no maximum number of messages.
50
+
51
+
`MSGREFTYPES` SHOULD be sent, with a comma-separated list of types of message references they support as parameter to `CHATHISTORY` commands, in order of decreasing preference. Clients MUST ignore any type they do not support. The currently defined list of types is:
52
+
53
+
*`timestamp`, to reference messages by their timestamp
54
+
*`msgid`, to reference them by their `msgid`
55
+
56
+
If `MSGREFTYPES` is missing, clients SHOULD assume the server supports both and has no preference.
57
+
58
+
43
59
### `CHATHISTORY` Command
44
60
The client can request message history content by sending the `CHATHISTORY` command to the server. This command has the following general syntax:
45
61
@@ -129,6 +145,10 @@ If no message history can be returned due to an error, the `MESSAGE_ERROR` error
129
145
130
146
FAIL CHATHISTORY MESSAGE_ERROR the_given_command the_given_target [extra_context] :Messages could not be retrieved
131
147
148
+
If a client used a reference type (`timestamp=` or `msgid=`) the server does not support, the `INVALID_MSGREFTYPE` error code SHOULD be returned:
149
+
150
+
FAIL CHATHISTORY INVALID_MSGREFTYPE the_given_command the_given_target [extra_context] :msgid-based history requests are not supported
151
+
132
152
### Examples
133
153
134
154
Requesting the latest conversation upon joining a channel
0 commit comments