Skip to content

Conversation

@irrationalpie7
Copy link
Contributor

@irrationalpie7 irrationalpie7 commented Dec 25, 2025

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-3620

Purpose

Instead of checking whether orphan account is one of the creators to block notifications for newly-orphaned works, checks whether the creator associated with the subscription is still associated with the creation

Note

A lot of the issue instructions talk about removing the ability to subscribe to orphan account, which appears to already be the case (edit: I fully goofed here, I was logged out when I was looking at the orphan account page 😂🙃), so I figured this issue was still open because of it breaking subscriptions to other creators, and named this PR after what it actually fixes

Note

With this PR, if someone is subscribed to author A but not author B, where A and B are co-creators of a work, the user will NOT get a notification if author B adds a new chapter without author A

Testing Instructions

How can the Archive's QA team verify that this is working as you intended?

  1. Post a work with a co-creator
  2. Have one of the co-creators orphan the work
  3. Subscribe to the second creator
  4. Have the second creator add a chapter to the work
  5. Have a database admin send subscription notifications (bundle exec rake notifications:deliver_subscriptions) or wait for them to send
  6. Verify that you received a notification for the new chapter

References

Related issue: https://otwarchive.atlassian.net/browse/AO3-5696

Credit

irrationalpie (they/them)

Comment on lines 47 to 49
# We reach this case if e.g. someone is subscribed to a user, but they
# orphan the work before the subscription notification would be sent
return true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible we may also reach this check if:

  1. A and B have a work together
  2. User subscribes to A
  3. B posts a new chapter to the work, without listing A as co-creator for the chapter

The Jira issue for https://otwarchive.atlassian.net/browse/AO3-5696 suggests this behavior is not desired, so I need to do more testing/checking here to see what the behavior is in practice

Comment on lines -87 to +91
Scenario: Orphan a work (leave pseud) and don't notify subscribers to the work
Scenario: Orphan a work (leave pseud) but do notify subscribers to the work

Given the following activated user exists
| login | password | email |
| work_subscriber | password | work_subscriber@foo.com |
| login | password | email |
| work_subscriber | password | work_subscriber@foo.com |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My formatting settings appear to have changed a fair amount of whitespace in this file. If there's a specific formatter I could be using and some recommended settings, I'm happy to swap back! Otherwise it doesn't seem worth individually reverting the whitespace-only lines

let(:series) { build(:series) }
let(:work) { build(:work) }
let(:author_pseud) { create(:user).default_pseud }
let(:work) { create(:work, authors: [author_pseud]) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we now compare the subscribable to the creation.pseuds, it made more sense to me to create :work and similar variables with a known set of authors

@irrationalpie7 irrationalpie7 changed the title AO3-3620 Subscriptions to orphan_account don't work and having orphan_account as a co-author will break subscriptions to the other creator(s) AO3-3620 Fix subscriptions to other creator(s) for works co-authored with orphan_account Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant