Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
retribute.me
webclient
Commits
a2c2ea8b
Verified
Commit
a2c2ea8b
authored
Jun 07, 2019
by
Eliot Berriot
Browse files
Fixed an issue with local mastodon accounts
parent
eb3408ca
Pipeline
#4238
passed with stages
in 1 minute and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/sources/mastodon.js
View file @
a2c2ea8b
...
...
@@ -109,14 +109,22 @@ export default {
}
handledFavorites
+=
1
results
.
progressCount
+=
1
let
account
=
`webfinger:
${
f
.
account
.
acct
}
`
if
(
results
.
accounts
[
account
])
{
results
.
accounts
[
account
].
weight
+=
1
let
detail
=
get
(
results
.
accounts
[
account
],
'
detail
'
,
{})
let
accountId
if
(
f
.
account
.
acct
.
indexOf
(
'
@
'
)
>
-
1
)
{
// the account has full id already
accountId
=
`webfinger:
${
f
.
account
.
acct
}
`
}
else
{
// it's probably a local account, we add the domain by hand
accountId
=
`webfinger:
${
f
.
account
.
acct
}
@
${
account
.
domain
}
`
}
if
(
results
.
accounts
[
accountId
])
{
results
.
accounts
[
accountId
].
weight
+=
1
let
detail
=
get
(
results
.
accounts
[
accountId
],
'
detail
'
,
{})
let
mastodonDetail
=
get
(
detail
,
'
mastodon
'
,
{
favorites
:
0
})
mastodonDetail
.
favorites
+=
1
}
else
{
results
.
accounts
[
account
]
=
{
results
.
accounts
[
account
Id
]
=
{
weight
:
1
,
source
:
'
webfinger
'
,
id
:
f
.
account
.
acct
,
...
...
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