Commit 4cc07325 authored by mashirozx's avatar mashirozx
Browse files

perf: initial profile for all new user

parent d075cd93
Showing with 5 additions and 5 deletions
+5 -5
......@@ -395,11 +395,6 @@ class User < ApplicationRecord
user_invite_request = UserInviteRequest.new({ user_id: id, text: "This account was authorized by #{auth_provider}.", })
user_invite_request.save!
# for these users, they shall not be required to input profile again
account.update!(actor_type: 'Person')
account.update!(fields: [])
account.update!(discoverable: false)
prepare_new_user!
end
......@@ -480,6 +475,11 @@ class User < ApplicationRecord
end
def prepare_new_user!
# for these users, they shall not be required to input profile again
account.update!(actor_type: 'Person')
account.update!(fields: [])
account.update!(discoverable: false)
BootstrapTimelineWorker.perform_async(account_id)
ActivityTracker.increment('activity:accounts:local')
UserMailer.welcome(self).deliver_later
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment