Don't sneakily disable RSS behind users' backs

Also keeps the database shape consistent with what the ORM model says,
because upstream forgot to do that.
This commit is contained in:
~keith 2025-01-13 23:34:54 -05:00
parent 239393c64f
commit 6478399432
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View file

@ -2,9 +2,8 @@ export class AddUserEnableRss1733748798177 {
name = 'AddUserEnableRss1733748798177'
async up(queryRunner) {
// Disable by default, then specifically enable for all existing local users.
await queryRunner.query(`ALTER TABLE "user" ADD "enable_rss" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`UPDATE "user" SET "enable_rss" = true WHERE host IS NULL;`)
// No, leave RSS enabled by default, WTF guys?
await queryRunner.query(`ALTER TABLE "user" ADD "enable_rss" boolean NOT NULL DEFAULT true`);
}
async down(queryRunner) {

View file

@ -329,9 +329,8 @@ export class MiUser {
public signupReason: string | null;
/**
* True if profile RSS feeds are enabled for this user.
* Enabled by default (opt-out) for existing users, to avoid breaking any existing feeds.
* Disabled by default (opt-in) for newly created users, for privacy.
* True if profile RSS feeds are enabled for this user. Enabled by default.
* TODO: put the setting for this in the user wizard maybe?
*/
@Column('boolean', {
name: 'enable_rss',