-
Notifications
You must be signed in to change notification settings - Fork 3
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 ability to edit and delete messages #10
Comments
I don't see how this could be implemented while still remaining backwards compatible with existing IRC. While you don't specify it, I think this should explicitly be an ISUPPORT token over a capability, meaning it's not an opt-in, and will not work on clients that don't support it. |
I actually liked that people couldn't take anything back on IRC. :/ |
@RyanSquared, with #7, it becomes less of a problem if you ensure only private (slack-based) ircds implement it. I definitely don't want to see it on freenode. |
Could also be useful in an embedded community. I could see it possibly limited to certain channels or certain users (ie, only some users can edit their own posts). Potentially a moderator should be able to edit other people's posts. In Discord, I've seen cases where you may want to set that channel by channel as well (+o works like that anyways). @RyanSquared Also see ircv3/ircv3-specifications#289 (comment). Be careful about falling into "but this is what IRC is supposed to be!" because we're talking about protocol level here. As the comment says, protocol could be used in different ways for different situations. Networks can decide what is appropriate themselves. Not saying that there isn't some argument on the flips side #7 (comment) |
If this is the case, what about the possibility of logging moderator actions? Certain communities value transparency so much it drives which communication platforms they use. |
From a personal point of view: I don't agree with moderators being able to edit other comments, although the spec could allow for moderators to delete messages only. From the technical side: Ultimately, this isn't necessarily something that can the spec can control - it's up to the IRCD what edits and deletions to allow or prevent. The client simply has to display the modified results. All the spec can do is provide for a standardized command to make the changes and recommend certain privacy implementations, the latter of which are non-binding and non-enforceable. |
@dpyro Logging seems like a fair proposition to me, could be tied into the history playback discussion somewhere... @MuffinMedic Actually, most implementations I've seen are delete only, not edit, and that's more of what I was going for. And yeah, that's not something for the spec. |
This is implementation-specific behaviour. If you want that then you can use an implementation which supports it. |
Allowing just deletes instead of deletes+edits may be a good compromise.
I don’t think the goal of editing or deleting should be to hide information from the client, it should be to hide it from the user in an effort to improve their user experience. |
Maybe just client-only message in form of |
I think a complete edited message would be the only feasible way to accomplish this. Also sed-style substitutions are nice, they get complicated once you start needing to select for certain instances of text. The client would simply need to replace the old message with the new one. There's little downside to sending an entire edited message, sans for bandwidth, although this concern should be minimal in this use case. Partial replacements introduce unneeded levels of complexity and potential bugs with little benefit. |
Definitely want edits - I use them all the time when I make typos, and it bugs me that I can't in IRC. Fair point about sending the entire message. |
You can send n continuous edit commands, possibly inside of bath (if they're done all by once).
Like @lfp6 said - most typical use case would probably be correcting typos, and users are already using sed-like syntax for it. So for me it should be treated more like documenting existing, well-known, commonly used standard than proposing new, backward incompatible solution to cover same need. 😉 |
Clients are free to implement sed-style replacements if they wish. There is nothing stopping the client from parsing the substitution then sending the entire new message to the server. This is purely a UI consideration.
See above. Clients are free to setup the interface however they like. All the server cares about is the edited message it receives.
Having the server accept and forward a full-body message is less error-prone server side and much easier to implement. In contrast, accepting partial-type edits, the server has to further process the message, make the requested changes, and then forward them to clients. It should be the responsibility of the client to submit any changes in their final form. The server's only responsibility is to validate the change (permissions) and pass them on to other clients. |
weird stuff like this is why message editing should just replace the whole message, and avoid find-replace regexy syntax or similar. |
And Slack. Cannot forget about Slack. 😅 |
@MuffinMedic:
That's what I'm talking about. Just arguing, that no extra work is needed with sed-proposal, cause clients tends to normalize commonly used commands (
Implement what, exactly? Client tag?
For what reason? What exactly is that server processing you're still referring to? What above stripping client-tag if not supported?
And in my proposal it's still responsibility of client, just the receiving one. Cost of implementing exactly the same.
Yep. Permissions. Not content. No reason for server to bother with parsing message. It should only strip client-tag in case of not supporting client or flag on channel. Way easier to implement than stripping message formating. 😅
In case of overflow or any other parsing issue client can gracefully fallback to today's behavior, just displaying
Nope:
Or Tl;dr: learn about sed and stop trying to reinvent wheel again. |
Implement client-side sed-style substitutions. If a client wants to allow a user to edit a message with s/old/new/, there's nothing stopping that. It is the responsibility of the client to parse the substitution, make the appropriate edit to the original message, and then send the entirety of the edited message to the server.
The server needs to perform the text-substitution provided before forwarding it to clients. What's the alternative, sending the raw sed-substitution to all clients?
This would require that every single client support not only sed-style substitution parsing, but does so using the same regex library. This has 0 advantage but would make implementation almost impossible. There's no guarantee the changes would be consistent across clients.
This plays into my prior point above. The client editing the message must parse it in it's entirety. Relying on all clients to parse the changes itself would add massive inconsistencies.
Who's stripping formatting? Clients are welcome to retain formatting if they wish. If the server strips formatting, such as with a channel mode, it is expected that this be applied to the edited message as well. This does not add new or change any existing functionality. |
sed-style substitution requires implementing a non-trivial amount of code on the sending side when deciding when to send clients receiving sed-style substitutions need to make sure that the new message size doesn't overflow things internally, as well as write the code to parse whatever syntax we decide to allow for it (adding complexity). whole-message substitution is very simple. however, you do send more traffic and larger messages since you always need to send the whole message. at this point I think which option is chosen comes down to what the spec writer decides, how they write it up and how it's received by the WG but I much prefer the simpler option that's less susceptible to weird edge cases. |
I think most of what I've wanted to say already has been said, so I'll just post a comment in here saying that I am fiercely against the idea of sed style substitutions for a lot of reasons. Changing something that is an "existing norm" into something standardized breaks backwards compatibility, will trigger existing bots as well, will make some clients behave like others and not to mention that sed style is absolutely daunting (do you use sed-style regex? posix? what about the |
I can't see sed-style replacements working out well at all, and I retain the idea this should be limited to just deleting of messages and sending a new one. (where editing is an alias for this) rather than anything else. |
Another 👎 for sed-style replacement is that it makes server-side spam filtering more complex. |
@MuffinMedic, RTFM, I'm begging you. Or just my proposal. Then comment. In that particular order, that's important. Please.* [*] All of following (ehh, ok, same for that above) content was written in mostly ironic, humorous way (at least I was trying). It will be safer for everyone, if no one, under any circumstances, never gonna try to interpret anything except technical details seriously. You could consider as my rule of thumb, that if any part of it could be somehow interpreted in two ways, and one of them will make you feel offended, insulted or baked on a low heat - choose the second one.
Yep. Strip client-tag and send to clients. Just like that.
There are no need for client to support anything. Keywords for future reference: backwards compatibility, graceful fallback, progressive enhancement, Let me show you an example of today user correcting typo in message in commonly used, easy to understand, learn and interpret by all users way:
Let me show you an example* of tomorrow user correcting typo in message, when receivers client support message editing:
Now, let me show you an example of tomorrow user correcting typo in message, when receivers client don't support message editing, server don't support
Homework for you: find differences between examples No. 1 and 3, and refer it to previously googled keywords, especially first two of them. Yep, that's common on today channels, or even in texts between my and my GF (yep, I know, me-and-someone-I-know-whatever-proof is not a proof, just bragging). Cause it's simple, easy to understand (even when you are seeing that syntax for the first time you can guess what's about), quicker to type than "Not pay but play, meh, stupid keyboard", capable of correcting both single words and whole sentences, both grammar and spelling as well as factual mistakes. [*] real life clients should probably have better faster stronger UX than my sample example, I especially don't see any reason why anyone could want both [edited] tag and action-style message, but I'm not a UX designer or anything.
What I'm proposing is to grab current, commonly used, informal standard, and give users (and chanops) ability to decide if they want to attach hint about formatting to message. That's all. Cause that's all we need. Please, make special attention to keywords commonly used and informal standard, and refer it to history of previous client-side IRC extensions, for example: mIRC colors, DCC file transfer (and DCC in general), CTCP ACTION (and CTCP in general). Use Google if needed, noone gonna judge you. Question for A grade: and what exactly is your proposal to deal with old clients?
Eighter way, you will need not-so-trivial server side processing. Totally unnecessary processing, in my belief. Question for A+ grade: consider complexity of server-side code needed for each approach, and compare it to complexity of sed-like one (client-side). In other words: if making use of existing, complex and simple as ABC in the same time standard, with nice and seamless fallback working anywhere out of the box, no server support needed, well-known syntax and more is 0 advantage for you, probably will be the best to just give up and accept total incompatibility of our POVs for IRC, IM, programming and (for extra safety) IT at all.
Umm, what?
There is no such word as "impossible" in programming, just sometimes (some, heh) budget is too small (whatever our budget is counted in Dogecoins or in hours of free time*, no difference). 😅 And even that case have nothing to do with sed-like parser. Think of this: there are near fully compatible (in case of basic pattern matching, not necessarily in advanced matching groups and all that other cool things we don't need) implementations and reimplementations of Perl regexes (RegExps) existing for probably every language used by more than 5 developers (and even for few used by less than 5, eg. Delphi), and Perl regexes compared to basic sed-like text replacement looks just like newest Linux kernel code compared to my entertainment project from few years ago (it was written in C, targeting Arduino Leonardo, and capable of awesome and unbelievable things like turning LED off, AND turning LED on, AND doing it in loop, regardless of any conditions, without single break, once per each second!). That's could totally be just simple "find 1st occurrence and replace" (with addiction of full sentence handling, maybe). No need for any extra libraries, no place for implementation dependent differences (except for the case when someone request to replace some bytes of the Emoji or other multibyte Unicode characters, but worst case (when platform with buggy char boundary is used in conjunction with poor* programmer) scenario would be few glitched chars when someone willingly try to glitch some chars, and there are easier ways to achieve it. Easier... and platform independent. 😅). Literally any middle-skilled developer can write basic sed-like parser in few minutes... [*] Speaking of what... @DanielOaks, fair points.
Nope. As of basic implementation simple
I don't see any solutions different than |
How exactly?
In the same way like today.
Sorry, but I don't get it at all, could you please elaborate?
Simple substitutions, so commonly used in everyday IM solutions today. Easy to write by human, easy to read by human, and executable without any additional effort.
Client side scripts. Out of scope.
Hard to accomplish with simple "find-first-and-replace" approach.
Wasn't you just few minutes ago pointing out compatibility with existing bots? Wrote my own, worked with few others and I'm more concerned about handling deletions and resends than sed-like (on continuous crashtests since 1984). @SaberUK:
OK, that's true for servers using some sort of message content spam filtering, ugly spambots could potentially wrote fully legit message, and then with series of unreadable substitutions change contents to spammy one. Dealing with that would ofc depend on implementation, but eighter simple evaluation or even just filtering out suspicious messages (obfuscation attempts wasn't hard to detect in most known to me applications) could be god starting point. And ofc there is always opt-out, even server wide. |
Clients run existing solutions to do this. Plenty of client-side scripts and bots do this (in a more complex manner.), reducing it to something less ("literal sed style replacements") and omission of the
Except that would have been as expected behaviour. With your situation you've got two things doing it instead of one.
No
No they're not. Not when it conflicts with something that is existing. It's definitely worth considering how you'll break those scripts. The scripts are part of the existing clients and "irc culture" as much as anything else. |
Specification PR submitted - ircv3/ircv3-specifications#304 |
Similar to other chat services (Slack, Discord, etc...), a way to edit sent messages would be helpful to users who wish to correct a mistake. A single command to edit or delete the message could be sent. This command would only apply to
PRIVMSG
andNOTICE
.@label=ID DELMSG
@label=ID EDITMSG :new message content
This would provide no server-side history of message "versions", although clients may elect to do so themselves.
The biggest issue faced is security, in which the server must ensure that users can edit only their own messages. This is therefore intended most for services such as IRCCloud and similar that store messages linked to a specific user. There is also no ability to force deletion or edits logs and client support is optional.
The text was updated successfully, but these errors were encountered: