forked from AkkomaGang/akkoma
Merge branch 'feature/message-summary' into 'develop'
message summary See merge request pleroma/pleroma!249
This commit is contained in:
commit
cbef1030b7
4 changed files with 8 additions and 4 deletions
|
@ -191,7 +191,8 @@ def to_map(
|
|||
"tags" => tags,
|
||||
"activity_type" => "post",
|
||||
"possibly_sensitive" => possibly_sensitive,
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object)
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
||||
"summary" => object["summary"]
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -255,7 +255,8 @@ def render(
|
|||
"tags" => tags,
|
||||
"activity_type" => "post",
|
||||
"possibly_sensitive" => possibly_sensitive,
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object)
|
||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
||||
"summary" => summary
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -155,7 +155,8 @@ test "an activity" do
|
|||
"activity_type" => "post",
|
||||
"possibly_sensitive" => true,
|
||||
"uri" => activity.data["object"]["id"],
|
||||
"visibility" => "direct"
|
||||
"visibility" => "direct",
|
||||
"summary" => "2hu"
|
||||
}
|
||||
|
||||
assert ActivityRepresenter.to_map(activity, %{
|
||||
|
|
|
@ -48,7 +48,8 @@ test "a create activity with a note" do
|
|||
"text" => "Hey @shp!",
|
||||
"uri" => activity.data["object"]["id"],
|
||||
"user" => UserView.render("show.json", %{user: user}),
|
||||
"visibility" => "direct"
|
||||
"visibility" => "direct",
|
||||
"summary" => nil
|
||||
}
|
||||
|
||||
assert result == expected
|
||||
|
|
Loading…
Reference in a new issue