-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chathistory: add cursors #525
base: master
Are you sure you want to change the base?
Conversation
This improves reliability of timestamp-based queries by using an opaque cursor. A message at a page boundary can be missed by a client if one of its neighbours has the same timestamp.
CHATHISTORY TARGETS <timestamp> <timestamp> <limit> | ||
|
||
The `target` parameter specifies a single buffer (channel or nickname) from which history is to be retrieved. If a nickname is given as the `target` then the server SHOULD include history sent between the current user and the target nickname, including outgoing messages ("self messages"). The server SHOULD attempt to include history involving other nicknames if either the current user or the target nickname has changed during the requested timeframe. | ||
|
||
A `timestamp` parameter MUST have the format `timestamp=YYYY-MM-DDThh:mm:ss.sssZ`, as in the [server-time][server-time] extension. A `msgid` parameter MUST have the format `msgid=foobar`, as in the [message-ids][message-ids] extension. | ||
A `timestamp` parameter MUST have the format `timestamp=YYYY-MM-DDThh:mm:ss.sssZ`, as in the [server-time][server-time] extension. A `msgid` parameter MUST have the format `msgid=foobar`, as in the [message-ids][message-ids] extension. A `cursor` parameter MUST have the format `cursor=foobar`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cursor
to the possible MSGREFTYPES?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? If servers don't support cursors, they simply won't send CHATHISTORY CURSOR
. Meanwhile, MSGREFTYPES
might be useful for non-CHATHISTORY stuff in the future, where cursor
wouldn't make sense.
|
||
CHATHISTORY CURSORS <target> <next> [prev] | ||
|
||
`next` is a a cursor which can be used to query the next page of messages. `prev` is a cursor which can be used to query the previous page of messages, it MUST only be returned in response to `CHATHISTORY AROUND`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if a server has a prev
cursor but no next
cursor in response to CHATHISTORY AROUND
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about CHATHISTORY CURSORS <target> {<next>|*} {<prev>|*}
for CHATHISTORY AROUND
and CHATHISTORY CURSORS ` for the others?
ircv3/ircv3-specifications#525 Not tested live yet
Impl in M51: progval/matrix2051#55 |
This improves reliability of timestamp-based queries by using an opaque cursor. A message at a page boundary can be missed by a client if one of its neighbours has the same timestamp.