This website works better with JavaScript.
Home
Explore
Help
Sign In
jyt94
/
closedSocialMastodon
forked from
closed-social/mastodon
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
Fix follow suggestions ranking
closed-social-v3
Eugen Rochko
8 years ago
parent
7075cef8f9
commit
04bfd4262f
2 changed files
with
5 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
app/assets/javascripts/components/features/compose/components/suggestions_box.jsx
+1
-1
app/models/follow_suggestion.rb
+ 4
- 0
app/assets/javascripts/components/features/compose/components/suggestions_box.jsx
View File
@ -52,6 +52,10 @@ const SuggestionsBox = React.createClass({
render
(
)
{
const
accounts
=
this
.
props
.
accounts
.
take
(
3
)
;
if
(
account
.
size
===
0
)
{
return
<
div
/
>
;
}
return
(
<
div
style
=
{
outerStyle
}
>
<
strong
style
=
{
headerStyle
}
>
Who
to
follow
<
/
strong
>
+ 1
- 1
app/models/follow_suggestion.rb
View File
@ -7,7 +7,7 @@ START a=node:account_index(Account={id})
MATCH
(
a
)
-
[
:follows
]
-
>
(
b
)
-
[
:follows
]
-
>
(
c
)
WHERE
a
<
>
c
AND
NOT
(
a
)
-
[
:follows
]
-
>
(
c
)
RETURN
DISTINCT
c
.
account_id
RETURN
DISTINCT
c
.
account_id
,
c
.
nodeRank
ORDER
BY
c
.
nodeRank
LIMIT
{
limit
}
END
Write
Preview
Loading…
Cancel
Save