Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bridge
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mastodon
bridge
Commits
2e6f681a
Commit
2e6f681a
authored
Aug 12, 2018
by
Eugen Rochko
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error in follow_all
parent
6282234f
Pipeline
#165
passed with stages
in 4 minutes and 32 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
friends_controller.rb
app/controllers/friends_controller.rb
+3
-3
user_serializer.rb
app/serializers/user_serializer.rb
+2
-2
No files found.
app/controllers/friends_controller.rb
View file @
2e6f681a
...
...
@@ -28,9 +28,9 @@ class FriendsController < ApplicationController
def
follow_all
if
Sidekiq
::
Status
.
complete?
(
job_id
)
friends
=
self
.
friends
loaded_friends
=
friends
friends
.
each
do
|
friend
|
loaded_
friends
.
each
do
|
friend
|
next
if
friend
.
relative_account_id
.
blank?
||
friend
.
following
begin
...
...
@@ -41,7 +41,7 @@ class FriendsController < ApplicationController
end
end
Rails
.
cache
.
write
(
"
#{
current_user
.
id
}
/friends"
,
friends
.
map
{
|
f
|
[
f
.
id
,
f
.
relative_account_id
,
f
.
following
]
})
Rails
.
cache
.
write
(
"
#{
current_user
.
id
}
/friends"
,
loaded_
friends
.
map
{
|
f
|
[
f
.
id
,
f
.
relative_account_id
,
f
.
following
]
})
end
redirect_to
friends_path
...
...
app/serializers/user_serializer.rb
View file @
2e6f681a
...
...
@@ -9,11 +9,11 @@ class UserSerializer < ActiveModel::Serializer
end
def
mastodon_username
object
.
mastodon
.
uid
object
.
mastodon
&
.
uid
||
''
end
def
twitter_username
object
.
twitter
.
display_name
object
.
twitter
&
.
display_name
||
''
end
def
display_name
...
...
jomo@mstdn.io
@jomo
mentioned in issue
#4 (closed)
·
Aug 13, 2018
mentioned in issue
#4 (closed)
mentioned in issue #4
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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