diff --git a/changelog.d/docs.skip b/changelog.d/docs.skip new file mode 100644 index 000000000..fd1aae513 --- /dev/null +++ b/changelog.d/docs.skip @@ -0,0 +1 @@ +Update *Differences in Mastodon API responses from vanilla Mastodon* \ No newline at end of file diff --git a/changelog.d/notification-type-update.fix b/changelog.d/notification-type-update.fix new file mode 100644 index 000000000..ee864000c --- /dev/null +++ b/changelog.d/notification-type-update.fix @@ -0,0 +1 @@ +Add `update` to @notification_types diff --git a/changelog.d/typo.skip b/changelog.d/typo.skip new file mode 100644 index 000000000..721ba96c5 --- /dev/null +++ b/changelog.d/typo.skip @@ -0,0 +1 @@ +Fix typo in test name diff --git a/changelog.d/update-poll-voters-count.fix b/changelog.d/update-poll-voters-count.fix new file mode 100644 index 000000000..557c2b0df --- /dev/null +++ b/changelog.d/update-poll-voters-count.fix @@ -0,0 +1 @@ +Update voters count in remote polls when refreshing diff --git a/docs/development/API/differences_in_mastoapi_responses.md b/docs/development/API/differences_in_mastoapi_responses.md index a3d33fbcd..052b2716b 100644 --- a/docs/development/API/differences_in_mastoapi_responses.md +++ b/docs/development/API/differences_in_mastoapi_responses.md @@ -39,10 +39,13 @@ Has these additional fields under the `pleroma` object: - `emoji_reactions`: A list with emoji / reaction maps. The format is `{name: "☕", count: 1, me: true}`. Contains no information about the reacting users, for that use the `/statuses/:id/reactions` endpoint. - `parent_visible`: If the parent of this post is visible to the user or not. - `pinned_at`: a datetime (iso8601) when status was pinned, `null` otherwise. -- `non_anonymous`: true if the source post specifies the poll results are not anonymous. Currently only implemented by Smithereen. - `bookmark_folder`: the ID of the folder bookmark is stored within (if any). - `list_id`: the ID of the list the post is addressed to (if any, only returned to author). +Has these additional fields under the `poll.pleroma` object: + +- `non_anonymous`: true if the source post specifies the poll results are not anonymous. Currently only implemented by Smithereen. + The `GET /api/v1/statuses/:id/source` endpoint additionally has the following attributes: - `content_type`: The content type of the status source. @@ -97,6 +100,9 @@ Endpoints which accept `with_relationships` parameter: - `/api/v1/accounts/:id/followers` - `/api/v1/accounts/:id/following` - `/api/v1/mutes` +- `/api/v1/blocks` +- `/api/v1/search` +- `/api/v2/search` Has these additional fields under the `pleroma` object: diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 75f4ba503..80844ed71 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -74,6 +74,7 @@ defmodule Pleroma.Notification do reblog poll status + update } def changeset(%Notification{} = notification, attrs) do diff --git a/lib/pleroma/object/updater.ex b/lib/pleroma/object/updater.ex index b80bc7faf..d7f27184b 100644 --- a/lib/pleroma/object/updater.ex +++ b/lib/pleroma/object/updater.ex @@ -5,6 +5,7 @@ defmodule Pleroma.Object.Updater do require Pleroma.Constants + alias Pleroma.Maps alias Pleroma.Object alias Pleroma.Repo @@ -115,6 +116,7 @@ defmodule Pleroma.Object.Updater do # Choices are the same, but counts are different to_be_updated |> Map.put(key, updated_object[key]) + |> Maps.put_if_present("votersCount", updated_object["votersCount"]) else # Choices (or vote type) have changed, do not allow this _ -> to_be_updated diff --git a/test/pleroma/web/rich_media/parsers/twitter_card_test.exs b/test/pleroma/web/rich_media/parsers/twitter_card_test.exs index 15b272ff2..9069a2aed 100644 --- a/test/pleroma/web/rich_media/parsers/twitter_card_test.exs +++ b/test/pleroma/web/rich_media/parsers/twitter_card_test.exs @@ -92,7 +92,7 @@ defmodule Pleroma.Web.RichMedia.Parsers.TwitterCardTest do } end - test "takes first founded title in html head if there is html markup error" do + test "takes first found title in html head if there is html markup error" do html = File.read!("test/fixtures/nypd-facial-recognition-children-teenagers4.html") |> Floki.parse_document!()