Closed qexat closed 1 year ago
Automatic reject because it's missing a title page. :trollface:
mfw the relative links are not working :skull: gg GitHub
Great issue!
Ok more seriously I think we should do the whole tracking thing (feel free to PR). As for the extra things:
\b
s); we don't do this yet because it's easy to do a denial of service attack through unmonitored regex (the actual implementation will have a timeout).Yeah, I will merge any of these. Regex support especially.
I agree with the initial issue of editing/deleting. Tracking highlights for a short period (maybe 30 minutes) so as to update them is a good idea.
If the original message is deleted, I think it's best to just update it to say "Original message deleted" to avoid ghost pings, like you said.
Now for the features:
Matching on word will come free with regex support
Yeah, by "pattern matching" I was implying that.
All the other points are fair, I didn't expect all my suggestions to get unanimous approval anyway.
Tracking highlights for a short period (maybe 30 minutes) so as to update them is a good idea.
Yeah, 30 minutes sound reasonable, even in a moderation perspective.
It would be cool if the bot highlighted the part that triggered also.
It would be cool if the bot highlighted the part that triggered also.
I'd rather not have that since it would interfere with the message's formatting.
It would be cool if the bot highlighted the part that triggered also.
I'd rather not have that since it would interfere with the message's formatting.
I will beseech you to descry the substantive "ball" in this passage
It would be cool if the bot highlighted the part that triggered also.
I'd rather not have that since it would interfere with the message's formatting.
I will beseech you to descry the substantive "ball" in this passage
Third paragraph, "balled" (they probably meant "bawled").
It would be cool if the bot highlighted the part that triggered also.
I'd rather not have that since it would interfere with the message's formatting.
I will beseech you to descry the substantive "ball" in this passage
Third paragraph, "balled" (they probably meant "bawled").
It was rather a rhetorical question ; I wanted to pointed out that it is not always obvious.
Closing this since we now use https://github.com/CircuitSacul/Wires :)
An issue with highlight relevance
Glossary
Synopsis
Let's say user A has
cat
in their highlighted words list.If user B sends a message containing
cat
, user A will receive a notification about the TM.However, if user B edits their message, it could happen not to contain the word anymore, making the notification irrelevant. This also means that the user A has access to the previous version of the message[1], which can have serious implications, that will be discussed further.
Concerns
If
cat
is a pretty innocent substantive, an edge case subsists where the user B sends a rule-breaking TM. The message would have been deleted, but the user A will still be exposed to its contents through the notification.For instance, the current rules prohibit hate speech[2]. This means that one having a highlighted list is potentially exposing themselves to content they might did not want in the first place.
Proposal
TM tracking
TMs could be tracked for a given period of time -- if they get deleted, or edited, the bot can behave accordingly, removing the notification if needed.
One limitation of this proposal I can think of is that the ping of this notification is likely to stay (ghost ping).
An alternative could be that instead of deleting the notification, it would edit into saying something like: "This message has been edited/deleted".
To go further
While writing this, other ideas of features emerge in my mind. This is the part where I list them.
Word matching rather than character sequence
Currently, if one have
java
as a highlighted word, a message containing "javascript" is a TM.It should preferably use pattern matching rather than a simple
word in message
[3].Channel-dependent highlights
I think it would be a very nice feature if we could add/remove specific channels for a given highlight -- although, the
highlight create
command should by default set up the highlight for every channel.Allow close-enough to trigger
User B could mistype a word, but user A would still want to get a notification for it.
This idea is kind of mutually exclusive with this one, because I am not sure how to mix pattern matching and levenshtein distance thresholding.
Inhibitors
Inhibitors would be words that prevent a message from being TM even if they contained a highlight.
For example, if you have
rust
as a highlight andjavascript
has an inhibitor:To go further, make inhibitors highlight-dependent -- one inhibitor would have an effect on a specific highlight but not on any other.
Highlight temporary deactivation
One could want not to get notifications for a word for a certain time frame. This idea is at the very bottom because it might have a real-world purpose.
Notes
Note 1
That also implies that the user A would have access to contents that the user B deliberately decided to modify. Does this have legal implications? [↑]
Note 2
Rule 9 links the Discord guidelines: https://discord.com/guidelines. [↑]
Note 3
https://github.com/mcb-dev/mCodingBot/blob/main/mcodingbot/plugins/highlights.py#L201. [↑]