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
Pleroma
pleroma
Commits
2c8deecd
Commit
2c8deecd
authored
Mar 11, 2019
by
lain
Browse files
Merge branch 'add-local-field-to-status' into 'develop'
MastoAPI StatusView: Add locality indicator. See merge request
!920
parents
d9ae2d00
66774b55
Pipeline
#8854
passed with stages
in 3 minutes and 21 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/Differences-in-MastodonAPI-Responses.md
View file @
2c8deecd
...
...
@@ -13,3 +13,9 @@ Some apps operate under the assumption that no more than 4 attachments can be re
## Timelines
Adding the parameter
`with_muted=true`
to the timeline queries will also return activities by muted (not by blocked!) users.
## Statuses
Has these additional fields under the
`pleroma`
object:
-
`local`
: true if the post was made on the local instance.
lib/pleroma/web/mastodon_api/views/status_view.ex
View file @
2c8deecd
...
...
@@ -102,7 +102,10 @@ def render(
website:
nil
},
language:
nil
,
emojis:
[]
emojis:
[],
pleroma:
%{
local:
activity
.
local
}
}
end
...
...
@@ -181,7 +184,10 @@ def render("status.json", %{activity: %{data: %{"object" => object}} = activity}
website:
nil
},
language:
nil
,
emojis:
build_emojis
(
activity
.
data
[
"object"
][
"emoji"
])
emojis:
build_emojis
(
activity
.
data
[
"object"
][
"emoji"
]),
pleroma:
%{
local:
activity
.
local
}
}
end
...
...
test/web/mastodon_api/status_view_test.exs
View file @
2c8deecd
...
...
@@ -120,7 +120,10 @@ test "a note activity" do
static_url:
"corndog.png"
,
visible_in_picker:
false
}
]
],
pleroma:
%{
local:
true
}
}
assert
status
==
expected
...
...
Write
Preview
Supports
Markdown
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