Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon-fork
Commits
4cc07325
Commit
4cc07325
authored
3 years ago
by
mashirozx
Browse files
Options
Download
Email Patches
Plain Diff
perf: initial profile for all new user
parent
d075cd93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/user.rb
+5
-5
app/models/user.rb
with
5 additions
and
5 deletions
+5
-5
app/models/user.rb
+
5
-
5
View file @
4cc07325
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets