Fix unconfirmed accounts being registered as active users (#23803)

pull/24332/head
Claire 2023-03-06 16:00:08 +01:00
parent 4beeec4e50
commit 86b1adf7d7
1 changed files with 3 additions and 0 deletions

View File

@ -442,10 +442,13 @@ class User < ApplicationRecord
def prepare_new_user!
BootstrapTimelineWorker.perform_async(account_id)
ActivityTracker.increment('activity:accounts:local')
ActivityTracker.record('activity:logins', id)
UserMailer.welcome(self).deliver_later
end
def prepare_returning_user!
return unless confirmed?
ActivityTracker.record('activity:logins', id)
regenerate_feed! if needs_feed_update?
end