Skip to content
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

(As a Moderator in a Channel)– 'Denying' a Message Caught by AutoMod Shows No Confirmation (though it used to) #2682

Closed
AustinHolderr opened this issue Apr 24, 2021 · 13 comments · Fixed by #2742
Assignees
Labels
bug Something isn't working as intended

Comments

@AustinHolderr
Copy link

AustinHolderr commented Apr 24, 2021

Describe the bug:

Messages that get caught by AutoMod (as a moderator for the channel) don't tell you that they were OR show up at all in the Chatterino chat client when you deny them. There is no confirmation that your 'Deny' action on AutoMod even did anything...

To reproduce:

Have a message get caught by AutoMod and be a moderator for the channel in which the message is caught; Deny the AutoMod-caught message.

Screenshots:

The pop-up from AutoMod saying the message was caught, inside of Chatterino, after I clicked 'Deny' and nothing happened, (when something used to)- to verify and confirm that it was in fact denied and not posted to chat, also showing it doesn't let me delete the message caught, either.

(I've blocked out usernames to prevent the users involved from harassment of any sort due to their comments.)

Chatterino AutoMod Deny Issue 2

The completed Mod Action inside of Mod View showing that it did work, and the message caught WAS Denied and not posted to chat.

Chatterino AutoMod Deny Issue 3

Chatterino version:

Chatterino 2.3.0 (commit 2db140d)

Operating system:

macOS Big Sur Version 11.2.3

macOS Big Sur Version 11.2.3

Additional information:

It used to grey-out the caught message under AutoMod and say a local server message in chat confirming to the moderator/user that it was denied, inside of Chatterino; it no longer does this, and can drive moderators crazy because they don't know if denying it worked or not.

@AustinHolderr AustinHolderr added the bug Something isn't working as intended label Apr 24, 2021
@Felanbird
Copy link
Collaborator

This is likely to have happened because your connection to pubsub has died, try to replicate testing this by using the automod buttons shortly after starting Chatterino instead.

@AustinHolderr
Copy link
Author

This is likely to have happened because your connection to pubsub has died, try to replicate testing this by using the automod buttons shortly after starting Chatterino instead.

i quit and restart chatterino very frequently. it's not that.

@ALazyMeme
Copy link
Collaborator

ALazyMeme commented Apr 25, 2021

Next thing would be to try re-adding your account. Could be oauth related

@apa420
Copy link
Collaborator

apa420 commented Apr 26, 2021

I'm the one who implemented this automod feature. These automod messages you receive are pubsub messages which means that the connection is fine. It might be that twitch changed something about this since chatterino uses some undocumented api to deny and accept messages and if you deny or accept a message it should tell you phrase "x" has been added to the aprove/deny list or something similar.

https://github.com/Chatterino/chatterino2/blob/master/src/providers/twitch/PubsubClient.cpp#L533

Code is there for the deny and accept stuff.

I've now tested this and it seems that everything does work, except there's no messages in chat about allowing/denying stuff. I'm unsure if this is because twitch changed something or some other issue. So if you deny something the message will be marked as deleted. (Approving messages works as well)

It seems like none of these pubsub messages about automod are coming through except for the "message x has been rejected". Changing the automod level used to give a message, but doesn't anymore.

If someone wants to check if there are any new pubsub message id's you simply just print out all pubsub message names and check if there are any new ones on automod action (enabling automod allowing messages etc etc).

@Felanbird
Copy link
Collaborator

I've now tested this and it seems that everything does work, except there's no messages in chat about allowing/denying stuff. I'm unsure if this is because twitch changed something or some other issue. So if you deny something the message will be marked as deleted. (Approving messages works as well)

There used to be a message that stated the mod in question used the command /add_blocked_term, which you are correct no longer shows up, but the command in question was not actually a usable command and seemed to be just a placeholder message.

related code for smart people:

this->moderationActionHandlers["add_blocked_term"] =
[this](const auto &data, const auto &roomID) {
// A term has been added
AutomodUserAction action(data, roomID);
getCreatedByUser(data, action.source);
try
{
const auto &args = getArgs(data);
action.type = AutomodUserAction::AddBlocked;
if (args.Size() < 1)
{
return;
}
if (!rj::getSafe(args[0], action.message))
{
return;
}
this->signals_.moderation.automodUserMessage.invoke(action);
}
catch (const std::runtime_error &ex)
{
qCDebug(chatterinoPubsub)
<< "Error parsing moderation action:" << ex.what();
}
};

@ALazyMeme
Copy link
Collaborator

There used to be a message that stated the mod in question used the command /add_blocked_term, which you are correct no longer shows up, but the command in question was not actually a usable command and seemed to be just a placeholder message.

It's possible twitch changed someone and didn't document it (big surprise). cbenni's modlogsbot was working fine for me until recently (I assume these are ban request allows/denies):

image

@AustinHolderr
Copy link
Author

I've now tested this and it seems that everything does work, except there's no messages in chat about allowing/denying stuff. I'm unsure if this is because twitch changed something or some other issue. So if you deny something the message will be marked as deleted. (Approving messages works as well)

allowing and denying for me doesnt mark the original automod message as deleted... it just stays lit up..

@AustinHolderr
Copy link
Author

I've now tested this and it seems that everything does work, except there's no messages in chat about allowing/denying stuff. I'm unsure if this is because twitch changed something or some other issue. So if you deny something the message will be marked as deleted. (Approving messages works as well)

There used to be a message that stated the mod in question used the command /add_blocked_term, which you are correct no longer shows up, but the command in question was not actually a usable command and seemed to be just a placeholder message.

related code for smart people:

this->moderationActionHandlers["add_blocked_term"] =
[this](const auto &data, const auto &roomID) {
// A term has been added
AutomodUserAction action(data, roomID);
getCreatedByUser(data, action.source);
try
{
const auto &args = getArgs(data);
action.type = AutomodUserAction::AddBlocked;
if (args.Size() < 1)
{
return;
}
if (!rj::getSafe(args[0], action.message))
{
return;
}
this->signals_.moderation.automodUserMessage.invoke(action);
}
catch (const std::runtime_error &ex)
{
qCDebug(chatterinoPubsub)
<< "Error parsing moderation action:" << ex.what();
}
};

yeah, that's part of what's missing.

@AustinHolderr
Copy link
Author

There used to be a message that stated the mod in question used the command /add_blocked_term, which you are correct no longer shows up, but the command in question was not actually a usable command and seemed to be just a placeholder message.

It's possible twitch changed someone and didn't document it (big surprise). cbenni's modlogsbot was working fine for me until recently (I assume these are ban request allows/denies):

image

could you link the bot?

@Felanbird
Copy link
Collaborator

could you link the bot?

https://github.com/CBenni/modlogsbot

@apa420
Copy link
Collaborator

apa420 commented Apr 27, 2021

"/add_blocked_term" was never a command in normal chat, it was just a pubsub message or whatever and since it seems like twitch has changed something about automod I don't know how much we can do about this.

allowing and denying for me doesnt mark the original automod message as deleted... it just stays lit up..

What I meant was just that it doesn't looks like it works in chatterino, but the function of denying or allowing a message does indeed work.
(Right now the message only gets deleted when we get one of those pubsub messages from automod which says that the automod message should be deleted (which is on allow or deny), but I guess you could just delete the message on clicking one of the buttons instead.)

@apa420 apa420 added the blocked Something out of our power needs to change before proceeding with this issue label Apr 27, 2021
@iProdigy
Copy link
Contributor

iProdigy commented May 3, 2021

For add_blocked_term, delete_blocked_term, add_permitted_term, and delete_permitted_term, the type is no longer moderation_action but channel_terms_action (and the data object no longer has a value for the moderation_action key) so the current pubsub client appears to ignore it: https://github.com/Chatterino/chatterino2/blob/master/src/providers/twitch/PubsubClient.cpp#L1127

Example:
{"type":"MESSAGE","data":{"topic":"chat_moderator_actions.493418343.612932483","message":"{\"type\":\"channel_terms_action\",\"data\":{\"type\":\"add_blocked_term\",\"id\":\"a59a21f1-36e8-4bb5-ac37-62632d5a8321\",\"text\":\"⢿\",\"requester_id\":\"493418343\",\"requester_login\":\"posadabot\",\"channel_id\":\"612932483\",\"expires_at\":\"\",\"updated_at\":\"2021-05-03T19:46:19.115704756Z\",\"from_automod\":false}}"}}

 

edit: note that denying a message would yield add_blocked_term, but if one wanted a more explicit automod deny notification, the automod-queue.<user-id>.<channel-id> topic can be used (but i haven't tested this for third-party oauths yet):
{"type":"MESSAGE","data":{"topic":"automod-queue.493418343.53482260","message":"{\"type\":\"automod_caught_message\",\"data\":{\"content_classification\":{\"category\":\"profanity\",\"level\":2},\"message\":{\"content\":{\"text\":\"fack\",\"fragments\":[{\"text\":\"fack\",\"automod\":{\"topics\":{\"vulgar\":6}}}]},\"id\":\"9dcfc0d7-3290-4501-9ee0-451fff4caff4\",\"sender\":{\"user_id\":\"53888434\",\"login\":\"ogprodigy\",\"display_name\":\"OGprodigy\",\"chat_color\":\"#00FF7F\",\"badges\":[{\"id\":\"premium\",\"version\":\"1\"}]},\"sent_at\":\"2021-05-03T21:35:55.910067686Z\"},\"reason_code\":\"\",\"resolver_id\":\"493418343\",\"resolver_login\":\"posadabot\",\"status\":\"DENIED\"}}"}}

 

edit2:

Changing the automod level used to give a message, but doesn't anymore.

This was moved to its own pubsub topic, automod-levels-modification.<user-id>.<channel-id>

@apa420
Copy link
Collaborator

apa420 commented May 4, 2021

Thank you for your help @iProdigy I'll look into implementing a fix

@apa420 apa420 self-assigned this May 4, 2021
@apa420 apa420 removed the blocked Something out of our power needs to change before proceeding with this issue label May 4, 2021
GabeEddyT added a commit to GabeEddyT/chatterino2 that referenced this issue May 25, 2021
Release v2.3.2

- Major: New split for channels going live! /live. (Chatterino#1797)
- Minor: Added a message that displays a new date on new day. (Chatterino#1016)
- Minor: Hosting messages are now clickable. (Chatterino#2655)
- Minor: Messages held by automod are now shown to the user. (Chatterino#2626)
- Minor: Load 100 blocked users rather than the default 20. (Chatterino#2772)
- Bugfix: Fixed a potential crashing issue related to the browser extension. (Chatterino#2774)
- Bugfix: Strip newlines from stream titles to prevent text going off of split header (Chatterino#2755)
- Bugfix: Automod messages now work properly again. (Chatterino#2682)
- Bugfix: `Login expired` message no longer highlights all tabs. (Chatterino#2735)
- Bugfix: Fix a deadlock that would occur during user badge loading. (Chatterino#1704, Chatterino#2756)
- Bugfix: Tabbing in `Select a channel to open` is now consistent. (Chatterino#1797)
- Bugfix: Fix Ctrl + Backspace not closing colon emote picker. (Chatterino#2780)
- Bugfix: Approving/denying AutoMod messages works again. (Chatterino#2779)
- Dev: Migrated AutoMod approve/deny endpoints to Helix. (Chatterino#2779)
- Dev: Migrated Get Cheermotes endpoint to Helix. (Chatterino#2440)

# gpg: directory '/c/Users/gtroy/.gnupg' created
# gpg: keybox '/c/Users/gtroy/.gnupg/pubring.kbx' created
# gpg: Signature made Sun May 16 15:05:25 2021 EDT
# gpg:                using RSA key 16CA5983F9FDD6EB599AAA70911916E0523B22F6
# gpg: Can't check signature: No public key

# Conflicts:
#	src/widgets/settingspages/GeneralPage.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants