-
Notifications
You must be signed in to change notification settings - Fork 379
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
draft/chathistory support #1772
Comments
What is your idea where ZNC would get the old messages from? Do you want to disable buffer playback when a client connects to ZNC and instead the playback is made available via chathistory? |
I think this would behave in a similar manner to znc-playback module (https://github.com/jpnurmi/znc-playback / https://wiki.znc.in/Playback). Thus if the capability is enabled, then we should prevent auto playback and allow the client to fetch the buffers as desired using the I'd like to move away from the I think the following is needed for initial support:
There are some additional things we can support, but as I read the spec I don't think they are mandatory and can be added after:
Technically unrelated, but I'd love to see:
|
savebuff module somewhat addresses this |
Thus if the capability is enabled, then we should prevent auto
playback and allow the client to fetch the buffers as desired using
the `CHATHISTORY` commands. The underlying data source will stay the
same (`CBuffer`),
Yes, CHATHISTORY allows the client to handle how messages should be
played back, for example to emulate infinite scrolling (typically with
LATEST and BEFORE), to fill gaps in their cache (typically with AFTER
and BETWEEN) or to search for a message (typically with AROUND).
if the upstream server also supports chathistory
then we can forward the command upstream. I think we can treat
forwarding chathistory to upstream server we can treat this as next
steps and not part of initial support. At the moment only one IRCD
supports chathistory (oragono).
Of course, CHATHISTORY may be useful for ZNC as a client, to retrieve
gaps in its logs (e.g. after network failures). However, I don't think
it is a valid use-case for a bouncer to forward requests to upstreams.
The main point of CHATHISTORY is for downstreams to navigate through
bouncer logs.
There are some additional things we can support, but as I read the
spec I don't think they are mandatory and can be added after:
- [ ] Support `message-ids` - support for msgid so that we can
support chathistory commands with `msgid` parameter alongside time
operations. This is optional as it requires upstream server to
support message-ids which at this point is rate for the larger
networks.
msgid is indeed a non trivial feature, but it can be implemented
without upstream support: for example, messages ID could be the row ID
in a SQL database that stores the logs.
Other than these comments I completely agree.
|
@hhirtz I don't think that's possible, the specifications states msgid value must be from the originating server, for which ZNC is not. ZNC wouldn't be able to enforce other uniqueness constraints for the upstream IRC network. This can create a confusing situation for clients because they may see msgid and have message-tags capability and expect commands like TAGMSG to work with message replies and reactions which ZNC won't be able to forward to the upstream server.
|
@hhirtz with such SQL ids, it's possible that different messages will clash:
|
It's possible for a bouncer to implement message-id even when upstreams
don't. Yes, it will lead to loss of client tags
- when relaying messages from downstreams to upstreams (e.g.
`@ reply=123123` should be dropped if the server doesn't have tag
support). This is OK, after all client tags are optional by design
since most IRC users don't use clients that support tags.
- the other way around, when an upstream sends a message with an
ID unknown to ZNC, but then clients wouldn't have made sense of it
even if ZNC had relayed it raw.
Anyway, ZNC does not have to relay IDs from upstream. A firsthand
msgid impl would involve two things:
- Craft an identifier that is unique for each message stored in ZNC logs,
- Have a way to map the (eventual) upstream message ID with the
crafted, internal ID.
So in this example,
1. Server without message id support sends a message
2. ZNC assigns it id 6346, and stores it. Sends that id to client, etc
3. Years later, server gains support of message ids
4. Server sends a message with id 6346. What ZNC is supposed to do with this message now?
ZNC would store the message and make a unique ID for it. It can make
one from a SQL primary key, or generate a UUID or something.
When ZNC relays upstream messages to downstreams, it replaces the
upstream msgid with its crafted ID (or adds it if it's missing).
When ZNC relays downstream messages to upstream, ZNC replaces any
crafted ID with their upstream equivalent (or removes them if the server
doesn't support message tags).
|
Now that the specification has a draft[0], can ZNC support chathistory as a server? I have a client that supports it and would very much be able to infinite scroll.
[0] https://ircv3.net/specs/extensions/chathistory
The text was updated successfully, but these errors were encountered: