Enable Email Notifications by default

Hi,

I notice that in our current setup (Gitea 1.21.4) a new user has an empty value in their email notifications preference (Settings > Account > Manage Email Addresses). How can I:

  1. Change the config so that new users have “Enable Email Notifications” set by default?
  2. Switch all existing users to “Enable Email Notifications”?

In case it is relevant, the current config has the following:

REGISTER_EMAIL_CONFIRM = true
ENABLE_NOTIFY_MAIL = true
DEFAULT_KEEP_EMAIL_PRIVATE = true

When I look into the sqlite database, I see that new users have the value ‘true’ in the column email_notifications_preference of the users table, whereas the users who have explicitly set “Enable Email Notifications” in the UI have the value ‘enabled’ in that column.

Also, the default value for the column in the database, according to the CREATE TABLE statement, is ‘enabled’. Which seems to indicate that Gitea writes an incorrect value ‘true’ into this column for some reason.