Page MenuHomePhabricator

Allow a user to be blocked from sending thanks
Closed, ResolvedPublic3 Estimated Story PointsFeature

Description

Problem to solve

Users may sometimes harass other users (intentionally or unintentionally) with excess use of the "Thanks" options.

Proposed solution

To tackle this, it would be nice to have a way to partially block a user from sending thanks only. Hopefully this will help us retain users while helping them learn wiki policies into becoming constructive members on the projects.

What needs doing

Add the thanks action to the BlockActionInfoService. This will need to be done using the GetAllBlockActions hook.

Some of the acceptance criteria below will be handled by other tasks.

There is an open question of how to assign IDs to blockable actions added by extensions (T280808). This can be resolved before or after this task.

Acceptance criteria (for testing)

image.png (1×1 px, 266 KB)

  • On Special:Block, under 'Actions to block' there is a checkbox for Sending thanks (see T280719 for the final design)
  • When a block is saved with the 'Sending thanks' checkbox selected, the target user should not be able to thank another user via the UI, API or any other tool.
  • When a block is saved with the 'Sending thanks' checkbox selected, the log items should indicate page creation is part of the block (done in T199918)

e.g. 23:20, 26 November 2018 AdminUsername (talk | contribs | block) blocked BadUser (talk | contribs) from sending thanks with an expiration time of N (autoblock disabled) (unblock | change block)

  • Special:BlockList should display that a user is blocked from creating pages as a bullet in the 'Block parameters' column (done in T279559)
Related tasks

Event Timeline

Xaosflux changed the subtype of this task from "Task" to "Feature Request".
DannyS712 triaged this task as Low priority.
DannyS712 added a project: Anti-Harassment.

Tagging Anti-Harassment for product approval before proceeding

Tagging Anti-Harassment for product approval before proceeding

Thanks @DannyS712. I'll get back to you on this soon.

@DannyS712 So from anti-harassment perspective this generally seems like a good idea. My only concern is that this will aggravate the problem that was being discussed in T217363: Consider minimizing the presence of Partial Blocks UI elements on Special:Block. I realize you already have a patch for hiding partial block options when not applicable in that ticket. Maybe we can first get a push on that and merge it before working on this task. I will leave a comment on that task.

->later pending official product approval to proceed

Niharika raised the priority of this task from Low to Medium.Apr 13 2021, 2:54 PM
Niharika updated the task description. (Show Details)
ARamirez_WMF set the point value for this task to 3.

Change 681421 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/Thanks@master] [WIP] Allow partially blocking giving thanks

https://gerrit.wikimedia.org/r/681421

Change 681421 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] Allow partially blocking giving thanks

https://gerrit.wikimedia.org/r/681421

Change 690667 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/Thanks@master] ApiCoreThank: Ensure partial block against thanks applies to revisions

https://gerrit.wikimedia.org/r/690667

Change 690667 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] ApiCoreThank: Ensure partial block against thanks applies to revisions

https://gerrit.wikimedia.org/r/690667

Change 691161 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/Thanks@master] ApiFlowThank: Prevent thanking from Flow if partial blocked against thanks

https://gerrit.wikimedia.org/r/691161

dom_walden subscribed.

At the moment, when we block users from sending thanks, we are blocking:

  • Special:Thanks
  • Special:Thanks/Log
  • API:Thank (for both revisions and logs)
  • We don't show the (thank) button on the page's revision history or Special:Log

It does not yet block users from:

  • API:Flowthank
  • Special:Thanks/Flow

But the above patch in review should sort that out.

For regression, I tested that, as before, users are blocked from thanking on any page they are blocked from. So, to block users from thanking on Flow/Structured Discussions we can block them from the User_talk namespace.

I am moving into Code Review column for greater visibility.

Change 691161 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] ApiFlowThank: Prevent thanking from Flow if partial blocked against thanks

https://gerrit.wikimedia.org/r/691161

While blocked only from sending Thanks, on a user_talk page with Flow/Structured Discussions enabled:

  • "Thank" still shows next to other people's comments
  • After clicking "Thank", see an error popup (Thank action failed (error code: blocked). Please try again.)
    flow-thank-block-message.png (387×1 px, 58 KB)
  • After refreshing the page, "Thank" becomes "Thanked"
    • I think just in cookie/browser storage. After I cleared cookies and cache it became "Thank" again. But I will probably raise a separate bug.
      flow-thank-block-afterwards.png (390×1 px, 28 KB)
  • Also blocked when trying to submit Special:Thanks/Flow (which is the fallback if you don't have JS enabled)

This applies both to your own and to other people's user_talk pages, regardless of whether you are blocked from your own user_talk page.

Partially blocked from User_talk namespace but not from your own user_talk page:

  • On your own user_talk page:
    • "Thank" shown
    • Can thank by clicking "Thank" or via Special:Thanks/Flow
  • On another user's user_talk page:
    • Do not see "Thank"
    • Are blocked from thanking via API and Special:Thanks/Flow

As I believe all the code has been merged I will move directly into Done.

Test Environment: https://en.wikipedia.beta.wmflabs.org Thanks 1.2.0 (ca5b333) 07:55, 24 May 2021

  • After refreshing the page, "Thank" becomes "Thanked"
    • I think just in cookie/browser storage. After I cleared cookies and cache it became "Thank" again. But I will probably raise a separate bug.

Sounds worth raising, even if we can't get to it soon. Thanks Dom.