diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f681704c..86c0553d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.1.5] - 2019-11-09 +### Fixed +- Polls having different numbers in timelines/notifications/poll api endpoints due to cache desyncronization +- Pleroma API: OAuth token endpoint not being found when ".json" suffix is appended + +### Changed +- Frontend bundle updated to [044c9ad0](https://git.pleroma.social/pleroma/pleroma-fe/commit/044c9ad0562af059dd961d50961a3880fca9c642) + ## [1.1.4] - 2019-11-01 ### Fixed - Added a migration that fills up empty user.info fields to prevent breakage after previous unsafe migrations. diff --git a/lib/pleroma/object/containment.ex b/lib/pleroma/object/containment.ex index f077a9f32..5f9d75231 100644 --- a/lib/pleroma/object/containment.ex +++ b/lib/pleroma/object/containment.ex @@ -51,9 +51,7 @@ def contain_origin(id, %{"actor" => _actor} = params) do def contain_origin(id, %{"attributedTo" => actor} = params), do: contain_origin(id, Map.put(params, "actor", actor)) - def contain_origin_from_id(_id, %{"id" => nil}), do: :error - - def contain_origin_from_id(id, %{"id" => other_id} = _params) do + def contain_origin_from_id(id, %{"id" => other_id} = _params) when is_binary(other_id) do id_uri = URI.parse(id) other_uri = URI.parse(other_id) @@ -64,6 +62,8 @@ def contain_origin_from_id(id, %{"id" => other_id} = _params) do end end + def contain_origin_from_id(_id, _data), do: :error + def contain_child(%{"object" => %{"id" => id, "attributedTo" => _} = object}), do: contain_origin(id, object) diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex index cea33b5af..76f79f45d 100644 --- a/lib/pleroma/object/fetcher.ex +++ b/lib/pleroma/object/fetcher.ex @@ -38,7 +38,8 @@ defp reinject_object(struct, data) do data <- maybe_reinject_internal_fields(data, struct), changeset <- Object.change(struct, %{data: data}), changeset <- touch_changeset(changeset), - {:ok, object} <- Repo.insert_or_update(changeset) do + {:ok, object} <- Repo.insert_or_update(changeset), + {:ok, object} <- Object.set_cache(object) do {:ok, object} else e -> diff --git a/lib/pleroma/plugs/trailing_format_plug.ex b/lib/pleroma/plugs/trailing_format_plug.ex index ce366b218..a4b8a406d 100644 --- a/lib/pleroma/plugs/trailing_format_plug.ex +++ b/lib/pleroma/plugs/trailing_format_plug.ex @@ -24,7 +24,8 @@ defmodule Pleroma.Plugs.TrailingFormatPlug do "/api/help", "/api/externalprofile", "/notice", - "/api/pleroma/emoji" + "/api/pleroma/emoji", + "/api/oauth_tokens" ] def init(opts) do diff --git a/mix.exs b/mix.exs index 2f7ac0e80..33a8f11bb 100644 --- a/mix.exs +++ b/mix.exs @@ -106,7 +106,7 @@ defp deps do {:pbkdf2_elixir, "~> 0.12.3"}, {:trailing_format_plug, "~> 0.0.7"}, {:html_sanitize_ex, "~> 1.3.0"}, - {:html_entities, "~> 0.4"}, + {:html_entities, "~> 0.5", override: true}, {:phoenix_html, "~> 2.10"}, {:calendar, "~> 0.17.4"}, {:cachex, "~> 3.0.2"}, diff --git a/mix.lock b/mix.lock index 6fec476cf..2bcd26e03 100644 --- a/mix.lock +++ b/mix.lock @@ -41,7 +41,7 @@ "gen_smtp": {:hex, :gen_smtp, "0.14.0", "39846a03522456077c6429b4badfd1d55e5e7d0fdfb65e935b7c5e38549d9202", [:rebar3], [], "hexpm"}, "gettext": {:hex, :gettext, "0.17.0", "abe21542c831887a2b16f4c94556db9c421ab301aee417b7c4fbde7fbdbe01ec", [:mix], [], "hexpm"}, "hackney": {:hex, :hackney, "1.15.2", "07e33c794f8f8964ee86cebec1a8ed88db5070e52e904b8f12209773c1036085", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.5", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, - "html_entities": {:hex, :html_entities, "0.4.0", "f2fee876858cf6aaa9db608820a3209e45a087c5177332799592142b50e89a6b", [:mix], [], "hexpm"}, + "html_entities": {:hex, :html_entities, "0.5.0", "40f5c5b9cbe23073b48a4e69c67b6c11974f623a76165e2b92d098c0e88ccb1d", [:mix], [], "hexpm"}, "html_sanitize_ex": {:hex, :html_sanitize_ex, "1.3.0", "f005ad692b717691203f940c686208aa3d8ffd9dd4bb3699240096a51fa9564e", [:mix], [{:mochiweb, "~> 2.15", [hex: :mochiweb, repo: "hexpm", optional: false]}], "hexpm"}, "http_signatures": {:git, "https://git.pleroma.social/pleroma/http_signatures.git", "293d77bb6f4a67ac8bde1428735c3b42f22cbb30", [ref: "293d77bb6f4a67ac8bde1428735c3b42f22cbb30"]}, "httpoison": {:hex, :httpoison, "1.2.0", "2702ed3da5fd7a8130fc34b11965c8cfa21ade2f232c00b42d96d4967c39a3a3", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, diff --git a/priv/static/index.html b/priv/static/index.html index aaf421c7e..f1a26cc95 100644 --- a/priv/static/index.html +++ b/priv/static/index.html @@ -1 +1 @@ -Pleroma
\ No newline at end of file +Pleroma
\ No newline at end of file diff --git a/priv/static/static/css/app.4e8e80a2f95232cff399.css b/priv/static/static/css/app.fd71461124f3eb029b1b.css similarity index 97% rename from priv/static/static/css/app.4e8e80a2f95232cff399.css rename to priv/static/static/css/app.fd71461124f3eb029b1b.css index ca3d4e41f..6ab9849ec 100644 Binary files a/priv/static/static/css/app.4e8e80a2f95232cff399.css and b/priv/static/static/css/app.fd71461124f3eb029b1b.css differ diff --git a/priv/static/static/css/app.4e8e80a2f95232cff399.css.map b/priv/static/static/css/app.fd71461124f3eb029b1b.css.map similarity index 95% rename from priv/static/static/css/app.4e8e80a2f95232cff399.css.map rename to priv/static/static/css/app.fd71461124f3eb029b1b.css.map index dc2c92ced..660b09d2c 100644 --- a/priv/static/static/css/app.4e8e80a2f95232cff399.css.map +++ b/priv/static/static/css/app.fd71461124f3eb029b1b.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.4e8e80a2f95232cff399.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./src/hocs/with_load_more/with_load_more.scss","webpack:///./src/components/tab_switcher/tab_switcher.scss","webpack:///./src/hocs/with_subscription/with_subscription.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;AClFA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"static/css/app.fd71461124f3eb029b1b.css","sourcesContent":[".with-load-more-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: #222;\n border-top-color: var(--border, #222);\n}\n.with-load-more-footer .error {\n font-size: 14px;\n}",".tab-switcher {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.tab-switcher .contents {\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n min-height: 0px;\n}\n.tab-switcher .contents .hidden {\n display: none;\n}\n.tab-switcher .contents.scrollable-tabs {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n overflow-y: auto;\n}\n.tab-switcher .tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n box-sizing: border-box;\n}\n.tab-switcher .tabs::after, .tab-switcher .tabs::before {\n display: block;\n content: \"\";\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}\n.tab-switcher .tabs .tab-wrapper {\n height: 28px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.tab-switcher .tabs .tab-wrapper .tab {\n width: 100%;\n min-width: 1px;\n position: relative;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 6px 1em;\n padding-bottom: 99px;\n margin-bottom: -93px;\n white-space: nowrap;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active) {\n z-index: 4;\n}\n.tab-switcher .tabs .tab-wrapper .tab:not(.active):hover {\n z-index: 6;\n}\n.tab-switcher .tabs .tab-wrapper .tab.active {\n background: transparent;\n z-index: 5;\n}\n.tab-switcher .tabs .tab-wrapper .tab img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n}\n.tab-switcher .tabs .tab-wrapper:not(.active)::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n border-bottom: 1px solid;\n border-bottom-color: #222;\n border-bottom-color: var(--border, #222);\n}",".with-subscription-loading {\n padding: 10px;\n text-align: center;\n}\n.with-subscription-loading .error {\n font-size: 14px;\n}"],"sourceRoot":""} \ No newline at end of file diff --git a/priv/static/static/font/LICENSE.txt b/priv/static/static/font/LICENSE.txt old mode 100644 new mode 100755 diff --git a/priv/static/static/font/README.txt b/priv/static/static/font/README.txt old mode 100644 new mode 100755 diff --git a/priv/static/static/font/config.json b/priv/static/static/font/config.json old mode 100644 new mode 100755 index a8300b5fd..c0cf17271 --- a/priv/static/static/font/config.json +++ b/priv/static/static/font/config.json @@ -297,6 +297,12 @@ "css": "zoom-in", "code": 59420, "src": "fontawesome" + }, + { + "uid": "0bda4bc779d4c32623dec2e43bd67ee8", + "css": "gauge", + "code": 61668, + "src": "fontawesome" } ] } \ No newline at end of file diff --git a/priv/static/static/font/css/animation.css b/priv/static/static/font/css/animation.css old mode 100644 new mode 100755 diff --git a/priv/static/static/font/css/fontello-codes.css b/priv/static/static/font/css/fontello-codes.css old mode 100644 new mode 100755 index c281baaff..87b4930e5 Binary files a/priv/static/static/font/css/fontello-codes.css and b/priv/static/static/font/css/fontello-codes.css differ diff --git a/priv/static/static/font/css/fontello-embedded.css b/priv/static/static/font/css/fontello-embedded.css old mode 100644 new mode 100755 index ca7dc40ab..861ef86e0 Binary files a/priv/static/static/font/css/fontello-embedded.css and b/priv/static/static/font/css/fontello-embedded.css differ diff --git a/priv/static/static/font/css/fontello-ie7-codes.css b/priv/static/static/font/css/fontello-ie7-codes.css old mode 100644 new mode 100755 index bdfe3efb7..11c8c10a2 Binary files a/priv/static/static/font/css/fontello-ie7-codes.css and b/priv/static/static/font/css/fontello-ie7-codes.css differ diff --git a/priv/static/static/font/css/fontello-ie7.css b/priv/static/static/font/css/fontello-ie7.css old mode 100644 new mode 100755 index ee47dfd1f..edf83afe6 Binary files a/priv/static/static/font/css/fontello-ie7.css and b/priv/static/static/font/css/fontello-ie7.css differ diff --git a/priv/static/static/font/css/fontello.css b/priv/static/static/font/css/fontello.css old mode 100644 new mode 100755 index 653ada3c4..a6b3c9193 Binary files a/priv/static/static/font/css/fontello.css and b/priv/static/static/font/css/fontello.css differ diff --git a/priv/static/static/font/demo.html b/priv/static/static/font/demo.html old mode 100644 new mode 100755 index 1a28bc774..afae72fa5 --- a/priv/static/static/font/demo.html +++ b/priv/static/static/font/demo.html @@ -229,11 +229,11 @@ body { } @font-face { font-family: 'fontello'; - src: url('./font/fontello.eot?31206390'); - src: url('./font/fontello.eot?31206390#iefix') format('embedded-opentype'), - url('./font/fontello.woff?31206390') format('woff'), - url('./font/fontello.ttf?31206390') format('truetype'), - url('./font/fontello.svg?31206390#fontello') format('svg'); + src: url('./font/fontello.eot?56851497'); + src: url('./font/fontello.eot?56851497#iefix') format('embedded-opentype'), + url('./font/fontello.woff?56851497') format('woff'), + url('./font/fontello.ttf?56851497') format('truetype'), + url('./font/fontello.svg?56851497#fontello') format('svg'); font-weight: normal; font-style: normal; } @@ -340,30 +340,32 @@ body {
icon-chart-bar0xe81b
+
icon-zoom-in0xe81c
icon-spin30xe832
icon-spin40xe834
icon-link-ext0xf08e
-
icon-link-ext-alt0xf08f
+
icon-link-ext-alt0xf08f
icon-menu0xf0c9
icon-mail-alt0xf0e0
+
icon-gauge0xf0e4
+
+
icon-comment-empty0xf0e5
icon-bell-alt0xf0f3
-
-
icon-plus-squared0xf0fe
icon-reply0xf112
+
+
icon-smile0xf118
icon-lock-open-alt0xf13e
-
-
icon-ellipsis0xf141
icon-play-circled0xf144
-
icon-thumbs-up-alt0xf164
-
icon-binoculars0xf1e5
+
icon-thumbs-up-alt0xf164
+
icon-binoculars0xf1e5
icon-user-plus0xf234
diff --git a/priv/static/static/font/font/fontello.eot b/priv/static/static/font/font/fontello.eot old mode 100644 new mode 100755 index 197a60420..1703fd97f Binary files a/priv/static/static/font/font/fontello.eot and b/priv/static/static/font/font/fontello.eot differ diff --git a/priv/static/static/font/font/fontello.svg b/priv/static/static/font/font/fontello.svg old mode 100644 new mode 100755 index 7ffb321bc..f5e497ce4 --- a/priv/static/static/font/font/fontello.svg +++ b/priv/static/static/font/font/fontello.svg @@ -76,6 +76,8 @@ + + diff --git a/priv/static/static/font/font/fontello.ttf b/priv/static/static/font/font/fontello.ttf old mode 100644 new mode 100755 index 6ec04a304..e9ed78031 Binary files a/priv/static/static/font/font/fontello.ttf and b/priv/static/static/font/font/fontello.ttf differ diff --git a/priv/static/static/font/font/fontello.woff b/priv/static/static/font/font/fontello.woff old mode 100644 new mode 100755 index 231c2c460..1d5025d3c Binary files a/priv/static/static/font/font/fontello.woff and b/priv/static/static/font/font/fontello.woff differ diff --git a/priv/static/static/font/font/fontello.woff2 b/priv/static/static/font/font/fontello.woff2 old mode 100644 new mode 100755 index bf84b5608..078991eb8 Binary files a/priv/static/static/font/font/fontello.woff2 and b/priv/static/static/font/font/fontello.woff2 differ diff --git a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js b/priv/static/static/js/2.48f39bc510b7c0a7fca6.js deleted file mode 100644 index eabbcf690..000000000 Binary files a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js and /dev/null differ diff --git a/priv/static/static/js/2.73375b727cef616c59b4.js b/priv/static/static/js/2.73375b727cef616c59b4.js new file mode 100644 index 000000000..ebfd9acbd Binary files /dev/null and b/priv/static/static/js/2.73375b727cef616c59b4.js differ diff --git a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map b/priv/static/static/js/2.73375b727cef616c59b4.js.map similarity index 92% rename from priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map rename to priv/static/static/js/2.73375b727cef616c59b4.js.map index be87ffa46..d2c864eb3 100644 Binary files a/priv/static/static/js/2.48f39bc510b7c0a7fca6.js.map and b/priv/static/static/js/2.73375b727cef616c59b4.js.map differ diff --git a/priv/static/static/js/app.105d64a8fcdd6724ccde.js b/priv/static/static/js/app.105d64a8fcdd6724ccde.js new file mode 100644 index 000000000..9cb129d22 Binary files /dev/null and b/priv/static/static/js/app.105d64a8fcdd6724ccde.js differ diff --git a/priv/static/static/js/app.105d64a8fcdd6724ccde.js.map b/priv/static/static/js/app.105d64a8fcdd6724ccde.js.map new file mode 100644 index 000000000..ab2588f48 Binary files /dev/null and b/priv/static/static/js/app.105d64a8fcdd6724ccde.js.map differ diff --git a/priv/static/static/js/app.c104f87a2caef36ab4e0.js b/priv/static/static/js/app.c104f87a2caef36ab4e0.js deleted file mode 100644 index a8a2d1076..000000000 Binary files a/priv/static/static/js/app.c104f87a2caef36ab4e0.js and /dev/null differ diff --git a/priv/static/static/js/app.c104f87a2caef36ab4e0.js.map b/priv/static/static/js/app.c104f87a2caef36ab4e0.js.map deleted file mode 100644 index 30a953567..000000000 Binary files a/priv/static/static/js/app.c104f87a2caef36ab4e0.js.map and /dev/null differ diff --git a/priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js.map b/priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js.map deleted file mode 100644 index 93d3ee58c..000000000 Binary files a/priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js.map and /dev/null differ diff --git a/priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js b/priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js similarity index 59% rename from priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js rename to priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js index a8e3a2c04..db0f6a9a3 100644 Binary files a/priv/static/static/js/vendors~app.24e6ba2d196f6210feda.js and b/priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js differ diff --git a/priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js.map b/priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js.map new file mode 100644 index 000000000..5e7b10459 Binary files /dev/null and b/priv/static/static/js/vendors~app.5c3fab032deb5f2793cb.js.map differ diff --git a/priv/static/static/styles.json b/priv/static/static/styles.json index 00ad6ae18..842092c44 100644 --- a/priv/static/static/styles.json +++ b/priv/static/static/styles.json @@ -5,11 +5,11 @@ "bird": [ "Bird", "#f8fafd", "#e6ecf0", "#14171a", "#0084b8", "#e0245e", "#17bf63", "#1b95e0", "#fab81e"], "ir-black": [ "Ir Black", "#000000", "#242422", "#b5b3aa", "#ff6c60", "#FF6C60", "#A8FF60", "#96CBFE", "#FFFFB6" ], "monokai": [ "Monokai", "#272822", "#383830", "#f8f8f2", "#f92672", "#F92672", "#a6e22e", "#66d9ef", "#f4bf75" ], - "mammal": [ "Mammal", "#272c37", "#444b5d", "#f8f8f8", "#9bacc8", "#7f3142", "#2bd850", "#2b90d9", "#ca8f04" ], "redmond-xx": "/static/themes/redmond-xx.json", "redmond-xx-se": "/static/themes/redmond-xx-se.json", "redmond-xxi": "/static/themes/redmond-xxi.json", "breezy-dark": "/static/themes/breezy-dark.json", - "breezy-light": "/static/themes/breezy-light.json" + "breezy-light": "/static/themes/breezy-light.json", + "mammal": "/static/themes/mammal.json" } diff --git a/priv/static/static/themes/mammal.json b/priv/static/static/themes/mammal.json new file mode 100644 index 000000000..50b8e2f00 --- /dev/null +++ b/priv/static/static/themes/mammal.json @@ -0,0 +1,57 @@ +{ + "_pleroma_theme_version": 2, + "name": "Mammal", + "theme": { + "shadows": { + "button": [], + "buttonHover": [ + { + "x": "0", + "y": "0", + "blur": "0", + "spread": 1024, + "color": "#56a7e1", + "alpha": "1", + "inset": true + } + ], + "buttonPressed": [ + { + "x": "0", + "y": "0", + "blur": "0", + "spread": 1024, + "color": "#56a7e1", + "alpha": "1", + "inset": true + } + ], + "panel": [], + "panelHeader": [], + "topBar": [] + }, + "opacity": { "input": "1" }, + "colors": { + "bg": "#282c37", + "text": "#f8f8f8", + "link": "#9bacc8", + "fg": "#444b5d", + "input": "#FFFFFF", + "inputText": "#282c37", + "btn": "#2b90d9", + "btnText": "#FFFFFF", + "cRed": "#7f3142", + "cBlue": "#2b90d9", + "cGreen": "#2bd850", + "cOrange": "#ca8f04" + }, + "radii": { + "btn": 4, + "input": 4, + "panel": "0", + "avatar": "4", + "avatarAlt": "4", + "attachment": "4" + } + } +} diff --git a/priv/static/sw-pleroma.js b/priv/static/sw-pleroma.js index 8f4c5e89b..ec6185afc 100644 Binary files a/priv/static/sw-pleroma.js and b/priv/static/sw-pleroma.js differ diff --git a/test/object/containment_test.exs b/test/object/containment_test.exs index 61cd1b412..a909f6db2 100644 --- a/test/object/containment_test.exs +++ b/test/object/containment_test.exs @@ -67,6 +67,20 @@ test "users cannot be collided through fake direction spoofing attempts" do end) =~ "[error] Could not decode user at fetch https://n1u.moe/users/rye, {:error, :error}" end + + test "contain_origin_from_id() gracefully handles cases where no ID is present" do + data = %{ + "type" => "Create", + "object" => %{ + "id" => "http://example.net/~alyssa/activities/1234", + "attributedTo" => "http://example.org/~alyssa" + }, + "actor" => "http://example.com/~bob" + } + + :error = + Containment.contain_origin_from_id("http://example.net/~alyssa/activities/1234", data) + end end describe "containment of children" do diff --git a/test/object_test.exs b/test/object_test.exs index 3d64fdb49..bf651f4fb 100644 --- a/test/object_test.exs +++ b/test/object_test.exs @@ -124,6 +124,8 @@ test "refetches if the time since the last refetch is greater than the interval" %Object{} = object = Object.normalize("https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d") + Object.set_cache(object) + assert Enum.at(object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(object.data["oneOf"], 1)["replies"]["totalItems"] == 0 @@ -133,6 +135,8 @@ test "refetches if the time since the last refetch is greater than the interval" }) updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1) + object_in_cache = Object.get_cached_by_ap_id(object.data["id"]) + assert updated_object == object_in_cache assert Enum.at(updated_object.data["oneOf"], 0)["replies"]["totalItems"] == 8 assert Enum.at(updated_object.data["oneOf"], 1)["replies"]["totalItems"] == 3 end @@ -141,6 +145,8 @@ test "returns the old object if refetch fails", %{mock_modified: mock_modified} %Object{} = object = Object.normalize("https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d") + Object.set_cache(object) + assert Enum.at(object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(object.data["oneOf"], 1)["replies"]["totalItems"] == 0 @@ -148,6 +154,8 @@ test "returns the old object if refetch fails", %{mock_modified: mock_modified} mock_modified.(%Tesla.Env{status: 404, body: ""}) updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1) + object_in_cache = Object.get_cached_by_ap_id(object.data["id"]) + assert updated_object == object_in_cache assert Enum.at(updated_object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(updated_object.data["oneOf"], 1)["replies"]["totalItems"] == 0 end) =~ @@ -160,6 +168,8 @@ test "does not refetch if the time since the last refetch is greater than the in %Object{} = object = Object.normalize("https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d") + Object.set_cache(object) + assert Enum.at(object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(object.data["oneOf"], 1)["replies"]["totalItems"] == 0 @@ -169,6 +179,8 @@ test "does not refetch if the time since the last refetch is greater than the in }) updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: 100) + object_in_cache = Object.get_cached_by_ap_id(object.data["id"]) + assert updated_object == object_in_cache assert Enum.at(updated_object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(updated_object.data["oneOf"], 1)["replies"]["totalItems"] == 0 end @@ -177,6 +189,8 @@ test "preserves internal fields on refetch", %{mock_modified: mock_modified} do %Object{} = object = Object.normalize("https://patch.cx/objects/9a172665-2bc5-452d-8428-2361d4c33b1d") + Object.set_cache(object) + assert Enum.at(object.data["oneOf"], 0)["replies"]["totalItems"] == 4 assert Enum.at(object.data["oneOf"], 1)["replies"]["totalItems"] == 0 @@ -192,6 +206,8 @@ test "preserves internal fields on refetch", %{mock_modified: mock_modified} do }) updated_object = Object.get_by_id_and_maybe_refetch(object.id, interval: -1) + object_in_cache = Object.get_cached_by_ap_id(object.data["id"]) + assert updated_object == object_in_cache assert Enum.at(updated_object.data["oneOf"], 0)["replies"]["totalItems"] == 8 assert Enum.at(updated_object.data["oneOf"], 1)["replies"]["totalItems"] == 3