HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
12.02k stars 4.1k forks source link

Remove and clean up unused invite notif #15279

Closed SabreCat closed 3 months ago

SabreCat commented 3 months ago

Fixes #10752

Previously, whenever a user accepted an invitation to a Party or Group Plan, the inviting user would receive a GROUP_INVITE_ACCEPTED notification. This notification was not displayed on the client, and thus it was possible for a user to continue to accumulate junk data in this array over time.

Now:

  1. GROUP_INVITE_ACCEPTED notifications are no longer posted to the user in these flows.
  2. We no longer check for GROUP_INVITE_ACCEPTED notifications in related tests.
  3. A migration has been created to remove extant GROUP_INVITE_ACCEPTED notifications from affected users.

For now, GROUP_INVITE_ACCEPTED remains as an enum in the user model notifications property. We shouldn't remove this until the migration has been run over all users. Once no more such notifications remain in the database, we can delete the enum.