-
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
Add the CHATHISTORY extension specification - refactored #393
Conversation
Co-Authored-By: Peter Powell <petpow@saberuk.com>
I think "The returned messages MUST be in ascending time order" (especially, but not only, when combined with the following SHOULD) is wrong for the same line of reasoning expressed here. The spec should not require servers to break the causal order of messages. It also feels like this section is specifying the batch type, not the command. |
Reraising the two issues I brought up on #349:
|
I got confused about the distinction between AFTER and LATEST despite having actually implemented the previous version of the spec. I think a minor language tweak would help: describing LATEST as "Request the most recent messages that have been sent, excluding anything sent before the given |
Now specified. Though I'm not sure in what case your |
After some discussion re. this comment, the working phrase at the moment is:
If no other input comes up I'll update the spec to use this. |
Questions about the BETWEEN semantics with msgids as the query parameters:
|
Message IDs are not reliable for any type of ordering as they are simply an identifier, so I'm not sure in what case you would attempt to order with them?
Good point... I've just been returning the empty batch and leaving it at that. I'll add this as a note.
I don't see why it should be limited in this way. If I have a msgid and want to find the next 5minutes worth of conversation this would allow that. |
I actually agree, but if this is so, what are the semantics of
I'm still bearish about the use of msgids in AFTER/BEFORE/BETWEEN/LATEST queries. I think time-based queries have more predictable behavior, since everyone (the client, each server, and a shared datastore) can agree on whether timestamp A precedes timestamp B. |
I'd like to propose removing BETWEEN, since we haven't really been able to determine what it's useful for. (Infinite scroll can use LATEST and then iterated BEFORE; as a sidenote, it might actually be helpful to provide pseudocode for this. If a client really wants the functionality of BETWEEN, they can implement it using AFTER.) |
What's the rationale for BEFORE being inclusive of the parameter, but AFTER being exclusive? Seems like it would make more sense for them both to be inclusive. If we also made LATEST inclusive and removed BETWEEN entirely, then all the subcommands would be inclusive, which is relatively straightforward. |
I think input from client developers would be helpful on both of these questions (removing BETWEEN and inclusive vs. exclusive). The impression I'm getting is that both BETWEEN and exclusive queries are more useful if clients plan to use the |
I've addressed all the outstanding issues I'm aware of. Let's take comments for a week or so and then merge as a draft? |
see ircv3-specifications PRs 427, 428
Last call for comments! |
Let's merge this on Monday. |
Concerns were raised in #ircv3 about replay of self-messages across nickname changes:
The person raising those concerns suggested adding a
the motivation being that rewriting is at once less important in the channel setting, and more disruptive (since nickname changes are often "part of the conversation" there). (In the channel setting, this is also potentially mitigated by |
* clarify that only successful CHATHISTORY commands get a BATCH * correct some references to `event-playback` to read `draft/event-playback`
Added a very hesitant line about rewriting:
|
I think we should merge this. |
Happy to merge this if all contributors are happy. A few non-blocking thoughts:
|
I'm not sure. #362 and #293 assume that by default, only PRIVMSG and NOTICE are suitable for inclusion in a chathistory batch. It's possible that the default/baseline assumption about TAGMSG is that they may produce a state change in the client, hence this caution?
Right now you get an empty batch. This seems fine to me on its own terms, but it's the same response you get for a permissions error or a nonexistent target, which might be the result of an excess of caution on security/privacy issues. |
There's no risk of TAGMSG causing a state related desync, they are by design lossy, so can't communicate important consistent state. #293 looks too old to consider TAGMSG, and no one in #362 never provided a rationale. Re: empty batch, I'm thinking more if the end comes half way through a reply, you have to make another request to confirm it's the end (with an empty batch). Seems minorly wasteful, but might not be a significant issue. |
You can check if the number of returned messages == the limit the client sent, and only request more if that's the case. So the empty batch should only happen when there are as many remaining messages as the limit. |
Yes, it's just that's a heuristic rather than something explicit. I think I'd prefer the latter, but it's not a blocker for merge. |
To give a concrete hypothetical of what something explicit might be, a tag on the BATCH might work:
I prefer to avoid positional params, for extensibility purposes, but a param is another option that would support clients without tags. e.g.
|
An additional comment – probably more of a blocker in the absence of any rationale – I'd upgrade these SHOULDs to MUSTs:
|
I'm not that enthusiastic about adding a "no more messages" indicator. I think I might like to add a new |
+1 |
Let's merge this? |
Sure, can do tomorrow. |
Overhaul from previous CHATHISTORY spec #349
Creating a new PR since the majority of it has now changed and most previous comments are no longer relevant with these changes.
Changes: