1
0
Fork 0
forked from fedi/mastodon

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

This commit is contained in:
Claire 2023-03-06 16:00:08 +01:00
parent 76c96cdd72
commit 11f04e3b97

View file

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