HomePhabricator

Don't subscribe bots implicitly when they act on objects, or when they are…

Description

Don't subscribe bots implicitly when they act on objects, or when they are mentioned

Summary:
See PHI1098. When users comment on objects, they are automatically subscribed. And when @alice mentions @bailey on a task, that usually subscribes @bailey.

These rules make less sense if the user is a bot. There's generally no reason for a bot to automatically subscribe to objects it acts on (it's not going to read email and follow up later), and it can always subscribe itself pretty easily if it wants (since everything is *.edit now and supports subscribe transactions).

Also, don't subscribe bots when they're mentioned for similar reasons. If users really want to subscribe bots, they can do so explicitly.

These rules seem slightly like "bad implicit magic" since it's not immediately obvious why @abc subscribes that user but @xyz may not, but some of these rules are fairly complicated already (e.g., @xyz doesn't subscribe them if they unsubscribed or are implicitly subscribed) and this feels like it gets the right/desired result almost-always.

Test Plan:
On a fresh task:

  • Mentioned a bot in a comment with @bot.
    • Before patch: bot got CC'd.
    • After patch: no CC.
  • Called maniphest.edit via the API to add a comment as a bot.
    • Before patch: bot got CC'd.
    • After patch: no CC.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20284