Page MenuHomePhabricator

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

Authored by epriestley on Wed, Mar 13, 6:48 PM.

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Wed, Mar 13, 6:48 PM
epriestley requested review of this revision.Wed, Mar 13, 6:50 PM
amckinley accepted this revision.Wed, Mar 13, 8:21 PM
This revision is now accepted and ready to land.Wed, Mar 13, 8:21 PM
This revision was automatically updated to reflect the committed changes.