-
Notifications
You must be signed in to change notification settings - Fork 79
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 message redaction #524
Conversation
Client B has no chance of deleting the message even if it supports it. Subject to chathistory, if server sent such REDACT upon reconnect, if the buffer was big enough. |
@DarthGandalf It's unreasonable to make it a requirement; but I mentioned in the "Server implementation considerations" that servers may send it in the |
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.
😋
|
||
This specification enables messages to be deleted. | ||
Use cases include retracting accidentally sent messages, moderation, | ||
and removing a [`+draft/react` client tag][], amongst others. |
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 should happen to existing reactions to the redacted message? And what should happen to attempts to redact such reacts later?
|
||
* exclude it entirely | ||
* replace it with the `REDACT` message with the same value as `@msgid` tag | ||
* add the `REDACT` message to the response (not counting toward message limits) |
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.
How does this interact with the event-playback
cap?
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.
As in, redacting JOIN/PART/... messages?
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.
My question is basically: are REDACT
messages always returned by chathistory regardless of event-playback
?
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.
I'd say yes. The motivation for event-playback
is that it's hard to deal with channel state (membership, op list, ...) and not necessarily very useful, right? Here this shouldn't be an issue.
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.
Right. I agree.
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.
Does this need to be specified in this spec?
Goguma impl (currently untested): https://git.sr.ht/~emersion/goguma/log/redact |
As emersion pointed out, it's just too weird
* exclude it entirely | ||
* replace its second parameter and/or tags with a placeholder and | ||
add the `REDACT` message to the response (not counting toward message limits) | ||
* add the `REDACT` message to the response (not counting toward message limits) |
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.
not counting toward message limits
This is at odds with #437 (comment).
Clients have no way to differentiate between a REDACT
returned implicitly by chathistory due to another message, or a standalone REDACT
message,
Standalone REDACT
messages are important to return in the case of a mobile client synchronizing its history at regular intervals via chathistory. Example:
- A
PRIVMSG
is sent at 20:00 - A mobile client synchronizes, gets the
PRIVMSG
via chathistory - A
REDACT
is sent at 20:30 - The mobile client synchronizes again, queries all messages sent strictly after 20:00
The server must return REDACT
at that point, or else the client misses it.
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 do clients need to differentiate between the two?
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.
Per the linked discussion above, my clients check whether there is more history to fetch by counting the number of messages. If it's less than the limit, no more messages.
Hm, but now that I've written this, this would only cause the number of messages to exceed the limit, causing needless but harmless chathistory requests in the edge case where there are no more messages. So it should be all fine?
Does a standalone REDACT
count towards the limit? I'd say yes. This draws a line between "standalone" and "context" messages.
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.
didn't the linked discussion settle on the empty batch to signify the end?
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.
The discussion hasn't really settled AFAIU, and my clients are still doing the limit check.
Please note, there is an interleaved discussion about what should happen when a channel has chathistory disabled, and this one has settled on empty batches instead of a FAIL
. But it's unrelated.
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.
ugh, true
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.
There are two ways to fix this issue that I see:
- Add a
@chathistory-context
tag to all "related"/"context" messages returned by chathistory: chathistory: add chathistory-context tag #526. Clients can ignore these when figuring out the selector for their next query. - Add cursor-based paging to chathistory: chathistory: add cursors #525.
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.
Does a resolution to this issue require changes to the redaction spec, or just to the chathistory spec? i.e. is this a blocker for merge/ratification?
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.
only the chathistory spec IMO
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.
Just spotted this other comment from @emersion that appears unaddressed https://github.com/ircv3/ircv3-specifications/pull/524/files#r1213547049
This PR has become a bit of a nightmare to review lol.
Goguma impl has been tested with Ergo. |
@jwheare Anything blocking merge? |
@jwheare ping? |
|
||
* `FAIL REDACT INVALID_TARGET the_given_target :You cannot delete messages from the_given_target` | ||
* `FAIL REDACT REDACT_FORBIDDEN <target> <target-msgid> :You are not authorised to delete this message` | ||
* `FAIL REDACT REDACT_WINDOW_EXPIRED <target> <target-msgid> <window> :You can no longer edit this message` |
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.
How is the window communicated to clients?
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.
For now, it's not. It could be an informational mode though.
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.
It's an easy thing to add later if needed. I don't believe it's worth blocking this PR because of this.
|
||
This specification enables messages to be deleted. | ||
Use cases include retracting accidentally sent messages, moderation, | ||
and removing a [`+draft/react` client tag][], amongst others. |
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.
I definitely think that react needs a way to unreact that doesn't rely on this spec. We can maybe mention that reactions can be REDACTed and this should have the same result, but that probably belongs in the react spec, not this one.
I would rather remove all references to react in this spec, but I can't think of another TAGMSG for the examples section. Original discussion here: https://github.com/ircv3/ircv3-specifications/pull/425/files#r602543189
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.
I think it makes sense to have it both in the intro of this spec, and formally in the react spec
Co-authored-by: James Wheare <[email protected]>
It's distracting
Co-authored-by: James Wheare <[email protected]>
Co-authored-by: James Wheare <[email protected]>
Gentle ping |
* Allowing channel moderators or server admins to delete unwelcome messages from others | ||
* Specifying a cut-off time after which message edits are no longer allowed | ||
|
||
If a message is redacted while a client is not present in a channel, servers may send the `REDACT` command in a `chathistory` batch when it re-joins the channel. |
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.
If a message is redacted while a client is not present in a channel, servers may send the `REDACT` command in a `chathistory` batch when it re-joins the channel. | |
Servers may send the `REDACT` command in a `chathistory` batch. |
Removes the implication that servers are tracking whether clients are present in a channel or not.
Should this section be in the normative part of the spec?
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.
The implication was intentional. And the normative already says REDACT
can be sent in chathistory
batches.
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.
The spec talks about the chathistory spec, not chathistory batches.
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.
ugh. I guess I meant all chathistory batches rather than just chathistory responses
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.
I'm still not sure why this implication is necessary. Which servers keep track of past membership when determining whether to send REDACTs in chathistory?
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.
none of them, but they could if they wanted to
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.
That could apply to a lot of things, what's the motivation for the special case here. Are you thinking of this in the context of e.g. the server can send a REDACT and omit the original PRIVMSG?
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.
yes, so that clients end up showing the same things as if they were in the channel the whole time
Co-authored-by: James Wheare <[email protected]>
Merged due to complexity of further review within this PR. Follow up unresolved issues are here #537 |
Rendered
This is #425 with the following changes:
UNKNOWN_MSGID
fail tag (because I noticed that's needed while implementing the spec)Implementations: