diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc536c55..003350658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,39 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed +### Added + +### Fixed +- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies + +### Removed + +## 2.4.1 - 2021-08-29 + +### Changed +- Make `mix pleroma.database set_text_search_config` run concurrently and indefinitely + +### Added +- AdminAPI: Missing configuration description for StealEmojiPolicy + +### Fixed +- MastodonAPI: Stream out Create activities +- MRF ObjectAgePolicy: Fix pattern matching on "published" +- TwitterAPI: Make `change_password` and `change_email` require params on body instead of query +- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies +- AdminAPI: Fix rendering reports containing a `nil` object +- Mastodon API: Activity Search fallbacks on status fetching after a DB Timeout/Error +- Mastodon API: Fix crash in Streamer related to reblogging +- AdminAPI: List available frontends when `static/frontends` folder is missing +- Make activity search properly use language-aware GIN indexes +- AdminAPI: Fix suggestions for MRF Policies + +## 2.4.0 - 2021-08-08 + +### Changed + - **Breaking:** Configuration: `:chat, enabled` moved to `:shout, enabled` and `:instance, chat_limit` moved to `:shout, limit` +- **Breaking** Entries for simple_policy, transparency_exclusions and quarantined_instances now list both the instance and a reason. - Support for Erlang/OTP 24 - The `application` metadata returned with statuses is no longer hardcoded. Apps that want to display these details will now have valid data for new posts after this change. - HTTPSecurityPlug now sends a response header to opt out of Google's FLoC (Federated Learning of Cohorts) targeted advertising. @@ -24,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AdminAPI: return `created_at` date with users. - `AnalyzeMetadata` upload filter for extracting image/video attachment dimensions and generating blurhashes for images. Blurhashes for videos are not generated at this time. - Attachment dimensions and blurhashes are federated when available. +- Mastodon API: support `poll` notification. - Pinned posts federation ### Fixed @@ -34,14 +67,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Mix task `pleroma.database prune_objects` - Fixed rendering of JSON errors on ActivityPub endpoints. - Linkify: Parsing crash with URLs ending in unbalanced closed paren, no path separator, and no query parameters - -### Removed -- **Breaking**: Remove deprecated `/api/qvitter/statuses/notifications/read` (replaced by `/api/v1/pleroma/notifications/read`) - -## Unreleased (Patch) - -### Fixed - - Try to save exported ConfigDB settings (migrate_from_db) in the system temp directory if default location is not writable. - Uploading custom instance thumbnail via AdminAPI/AdminFE generated invalid URL to the image - Applying ConcurrentLimiter settings via AdminAPI @@ -50,7 +75,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - MRF (`SimplePolicy`): Embedded objects are now checked. If any embedded object would be rejected, its parent is rejected. This fixes Announces leaking posts from blocked domains. - Fixed some Markdown issues, including trailing slash in links. -## [2.3.0] - 2020-03-01 +### Removed +- **Breaking**: Remove deprecated `/api/qvitter/statuses/notifications/read` (replaced by `/api/v1/pleroma/notifications/read`) + +## [2.3.0] - 2021-03-01 ### Security @@ -151,7 +179,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Mastodon API: Support for expires_in/expires_at in the Filters. -## [2.2.2] - 2020-01-18 +## [2.2.2] - 2021-01-18 ### Fixed diff --git a/README.md b/README.md index ba1522089..25fde90b9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ If your platform is not supported, or you just want to be able to edit the sourc - [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/) ### OS/Distro packages -Currently Pleroma is not packaged by any OS/Distros, but if you want to package it for one, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**. +Currently Pleroma is packaged for [YunoHost](https://yunohost.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**. ### Docker While we don’t provide docker files, other people have written very good ones. Take a look at or . diff --git a/config/config.exs b/config/config.exs index 26f039c5e..ccfba065e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -563,6 +563,7 @@ mailer: 10, transmogrifier: 20, scheduled_activities: 10, + poll_notifications: 10, background: 5, remote_fetcher: 2, attachments_cleanup: 1, diff --git a/config/description.exs b/config/description.exs index 934a62a62..c72231faa 100644 --- a/config/description.exs +++ b/config/description.exs @@ -687,12 +687,14 @@ }, %{ key: :quarantined_instances, - type: {:list, :string}, + type: {:list, :tuple}, + key_placeholder: "instance", + value_placeholder: "reason", description: - "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent", + "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so", suggestions: [ - "quarantined.com", - "*.quarantined.com" + {"quarantined.com", "Reason"}, + {"*.quarantined.com", "Reason"} ] }, %{ diff --git a/config/dev.exs b/config/dev.exs index 6b7ffb0e9..ab3e83c12 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -62,6 +62,7 @@ import_config "dev.secret.exs" else IO.puts( + :stderr, "!!! RUNNING IN LOCALHOST DEV MODE! !!!\nFEDERATION WON'T WORK UNTIL YOU CONFIGURE A dev.secret.exs" ) end diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 5b49185dc..d3c9c5716 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -39,7 +39,7 @@ To add configuration to your config file, you can copy it from the base config. * `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it. * `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance. * `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details. -* `quarantined_instances`: List of ActivityPub instances where private (DMs, followers-only) activities will not be send. +* `quarantined_instances`: ActivityPub instances where private (DMs, followers-only) activities will not be send. * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML). * `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with older software for theses nicknames. @@ -135,15 +135,16 @@ To add configuration to your config file, you can copy it from the base config. Configuring MRF policies is not enough for them to take effect. You have to enable them by specifying their module in `policies` under [:mrf](#mrf) section. #### :mrf_simple -* `media_removal`: List of instances to remove media from. -* `media_nsfw`: List of instances to put media as NSFW(sensitive) from. -* `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline. -* `reject`: List of instances to reject any activities from. -* `accept`: List of instances to accept any activities from. -* `followers_only`: List of instances to decrease post visibility to only the followers, including for DM mentions. -* `report_removal`: List of instances to reject reports from. -* `avatar_removal`: List of instances to strip avatars from. -* `banner_removal`: List of instances to strip banners from. +* `media_removal`: List of instances to strip media attachments from and the reason for doing so. +* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so. +* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so. +* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. +* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so. +* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so. +* `report_removal`: List of instances to reject reports from and the reason for doing so. +* `avatar_removal`: List of instances to strip avatars from and the reason for doing so. +* `banner_removal`: List of instances to strip banners from and the reason for doing so. +* `reject_deletes`: List of instances to reject deletions from and the reason for doing so. #### :mrf_subchain This policy processes messages through an alternate pipeline when a given message matches certain criteria. diff --git a/docs/configuration/howto_search_cjk.md b/docs/configuration/howto_search_cjk.md index d3ce28077..a73b10db3 100644 --- a/docs/configuration/howto_search_cjk.md +++ b/docs/configuration/howto_search_cjk.md @@ -5,7 +5,7 @@ Pleroma's full text search feature is powered by PostgreSQL's native [text searc ## Setup and test the new search config -In most cases, you would need an extension installed to support parsing CJK text. Here are a few extension you may choose from, or you are more than welcome to share additional ones you found working for you with the rest of Pleroma community. +In most cases, you would need an extension installed to support parsing CJK text. Here are a few extensions you may choose from, or you are more than welcome to share additional ones you found working for you with the rest of Pleroma community. * [a generic n-gram parser](https://github.com/huangjimmy/pg_cjk_parser) supports Simplifed/Traditional Chinese, Japanese, and Korean * [a Korean parser](https://github.com/i0seph/textsearch_ko) based on mecab @@ -34,7 +34,7 @@ Check output of the query, and see if it matches your expectation. mix pleroma.database set_text_search_config YOUR.CONFIG ``` -Note: index update may take a while. +Note: index update may take a while, and it can be done while the instance is up and running, so you may restart db connection as soon as you see `Recreate index` in task output. ## Restart database connection Since some changes above will only apply with a new database connection, you will have to restart either Pleroma or PostgreSQL process, or use `pg_terminate_backend` SQL command without restarting either. diff --git a/docs/configuration/mrf.md b/docs/configuration/mrf.md index 5618634a2..a31c26b9c 100644 --- a/docs/configuration/mrf.md +++ b/docs/configuration/mrf.md @@ -55,18 +55,18 @@ Servers should be configured as lists. ### Example -This example will enable `SimplePolicy`, block media from `illegalporn.biz`, mark media as NSFW from `porn.biz` and `porn.business`, reject messages from `spam.com`, remove messages from `spam.university` from the federated timeline and block reports (flags) from `whiny.whiner`: +This example will enable `SimplePolicy`, block media from `illegalporn.biz`, mark media as NSFW from `porn.biz` and `porn.business`, reject messages from `spam.com`, remove messages from `spam.university` from the federated timeline and block reports (flags) from `whiny.whiner`. We also give a reason why the moderation was done: ```elixir config :pleroma, :mrf, policies: [Pleroma.Web.ActivityPub.MRF.SimplePolicy] config :pleroma, :mrf_simple, - media_removal: ["illegalporn.biz"], - media_nsfw: ["porn.biz", "porn.business"], - reject: ["spam.com"], - federated_timeline_removal: ["spam.university"], - report_removal: ["whiny.whiner"] + media_removal: [{"illegalporn.biz", "Media can contain illegal contant"}], + media_nsfw: [{"porn.biz", "unmarked nsfw media"}, {"porn.business", "A lot of unmarked nsfw media"}], + reject: [{"spam.com", "They keep spamming our users"}], + federated_timeline_removal: [{"spam.university", "Annoying low-quality posts who otherwise fill up TWKN"}], + report_removal: [{"whiny.whiner", "Keep spamming us with irrelevant reports"}] ``` ### Use with Care diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index 13395ff25..c37ff0c63 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -1,4 +1,7 @@ # Installing on Alpine Linux + +{! backend/installation/otp_vs_from_source_source.include !} + ## Installation This guide is a step-by-step installation guide for Alpine Linux. The instructions were verified against Alpine v3.10 standard image. You might miss additional dependencies if you use `netboot` instead. diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md index d11deb621..285743d56 100644 --- a/docs/installation/arch_linux_en.md +++ b/docs/installation/arch_linux_en.md @@ -1,4 +1,7 @@ # Installing on Arch Linux + +{! backend/installation/otp_vs_from_source_source.include !} + ## Installation This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.archlinux.org/index.php/Sudo). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu pleroma`; in this case, use `su -s $SHELL -c 'command'` instead. diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md index 02682e5b0..4e52b2155 100644 --- a/docs/installation/debian_based_en.md +++ b/docs/installation/debian_based_en.md @@ -1,4 +1,7 @@ # Installing on Debian Based Distributions + +{! backend/installation/otp_vs_from_source_source.include !} + ## Installation This guide will assume you are on Debian 11 (“bullseye”) or later. This guide should also work with Ubuntu 18.04 (“Bionic Beaver”) and later. It also assumes that you have administrative rights, either as root or a user with [sudo permissions](https://www.digitalocean.com/community/tutorials/how-to-add-delete-and-grant-sudo-privileges-to-users-on-a-debian-vps). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu pleroma`; in this case, use `su -s $SHELL -c 'command'` instead. diff --git a/docs/installation/gentoo_en.md b/docs/installation/gentoo_en.md index 982ab52d2..36882c8c8 100644 --- a/docs/installation/gentoo_en.md +++ b/docs/installation/gentoo_en.md @@ -1,4 +1,7 @@ # Installing on Gentoo GNU/Linux + +{! backend/installation/otp_vs_from_source_source.include !} + ## Installation This guide will assume that you have administrative rights, either as root or a user with [sudo permissions](https://wiki.gentoo.org/wiki/Sudo). Lines that begin with `#` indicate that they should be run as the superuser. Lines using `$` should be run as the indicated user, e.g. `pleroma$` should be run as the `pleroma` user. diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index d303a6daf..e4a01d8db 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -1,7 +1,8 @@ # Switching a from-source install to OTP releases -## What are OTP releases? -OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. +{! backend/installation/otp_vs_from_source.include !} + +In this guide we cover how you can migrate from a from source installation to one using OTP releases. ## Pre-requisites You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index 3f67534ac..0861a8157 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -1,5 +1,9 @@ # Installing on Linux using OTP releases +{! backend/installation/otp_vs_from_source.include !} + +This guide covers a installation using an OTP release. To install Pleroma from source, please check out the corresponding guide for your distro. + ## Pre-requisites * A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below * A (sub)domain pointed to the machine diff --git a/docs/installation/otp_vs_from_source.include b/docs/installation/otp_vs_from_source.include new file mode 100644 index 000000000..63e837a53 --- /dev/null +++ b/docs/installation/otp_vs_from_source.include @@ -0,0 +1,3 @@ +## OTP releases vs from-source installations + +There are two ways to install Pleroma. You can use OTP releases or do a from-source installation. OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. With from source installations you install Pleroma from source, meaning you have to install certain dependencies like Erlang+Elixir and compile Pleroma yourself. diff --git a/docs/installation/otp_vs_from_source_source.include b/docs/installation/otp_vs_from_source_source.include new file mode 100644 index 000000000..63482b69d --- /dev/null +++ b/docs/installation/otp_vs_from_source_source.include @@ -0,0 +1,3 @@ +{! backend/installation/otp_vs_from_source.include !} + +This guide covers a from-source installation. To install using OTP releases, please check out [the OTP guide](./otp_en.md). diff --git a/docs/installation/yunohost_en.md b/docs/installation/yunohost_en.md new file mode 100644 index 000000000..4c34e85d5 --- /dev/null +++ b/docs/installation/yunohost_en.md @@ -0,0 +1,9 @@ +# Installing on Yunohost + +[YunoHost](https://yunohost.org) is a server operating system aimed at self-hosting. The YunoHost community maintains a package of Pleroma which allows you to install Pleroma on YunoHost. You can install it via the normal way through the admin web interface, or through the CLI. More information can be found at [the repo of the package](https://github.com/YunoHost-Apps/pleroma_ynh). + +## Questions + +Questions and problems related to the YunoHost parts can be done through the [regular YunoHost channels](https://yunohost.org/en/help). + +For questions about Pleroma, ask in [#pleroma:libera.chat](https://matrix.to/#/#pleroma:libera.chat) via Matrix or **#pleroma** on **libera.chat** via IRC. diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index 57f73d12b..a973beaa9 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -209,7 +209,9 @@ def run(["set_text_search_config", tsconfig]) do new.fts_content := to_tsvector(new.data->>'content'); RETURN new; END - $$ LANGUAGE plpgsql" + $$ LANGUAGE plpgsql", + [], + timeout: :infinity ) shell_info("Refresh RUM index") @@ -219,7 +221,9 @@ def run(["set_text_search_config", tsconfig]) do Ecto.Adapters.SQL.query!( Pleroma.Repo, - "CREATE INDEX objects_fts ON objects USING gin(to_tsvector('#{tsconfig}', data->>'content')); " + "CREATE INDEX CONCURRENTLY objects_fts ON objects USING gin(to_tsvector('#{tsconfig}', data->>'content')); ", + [], + timeout: :infinity ) end diff --git a/lib/pleroma/activity/search.ex b/lib/pleroma/activity/search.ex index ed898ba4f..09671f621 100644 --- a/lib/pleroma/activity/search.ex +++ b/lib/pleroma/activity/search.ex @@ -26,19 +26,23 @@ def search(user, search_query, options \\ []) do :plain end - Activity - |> Activity.with_preloaded_object() - |> Activity.restrict_deactivated_users() - |> restrict_public() - |> query_with(index_type, search_query, search_function) - |> maybe_restrict_local(user) - |> maybe_restrict_author(author) - |> maybe_restrict_blocked(user) - |> Pagination.fetch_paginated( - %{"offset" => offset, "limit" => limit, "skip_order" => index_type == :rum}, - :offset - ) - |> maybe_fetch(user, search_query) + try do + Activity + |> Activity.with_preloaded_object() + |> Activity.restrict_deactivated_users() + |> restrict_public() + |> query_with(index_type, search_query, search_function) + |> maybe_restrict_local(user) + |> maybe_restrict_author(author) + |> maybe_restrict_blocked(user) + |> Pagination.fetch_paginated( + %{"offset" => offset, "limit" => limit, "skip_order" => index_type == :rum}, + :offset + ) + |> maybe_fetch(user, search_query) + rescue + _ -> maybe_fetch([], user, search_query) + end end def maybe_restrict_author(query, %User{} = author) do @@ -61,10 +65,17 @@ defp restrict_public(q) do end defp query_with(q, :gin, search_query, :plain) do + %{rows: [[tsc]]} = + Ecto.Adapters.SQL.query!( + Pleroma.Repo, + "select current_setting('default_text_search_config')::regconfig::oid;" + ) + from([a, o] in q, where: fragment( - "to_tsvector(?->>'content') @@ plainto_tsquery(?)", + "to_tsvector(?::oid::regconfig, ?->>'content') @@ plainto_tsquery(?)", + ^tsc, o.data, ^search_query ) @@ -72,10 +83,17 @@ defp query_with(q, :gin, search_query, :plain) do end defp query_with(q, :gin, search_query, :websearch) do + %{rows: [[tsc]]} = + Ecto.Adapters.SQL.query!( + Pleroma.Repo, + "select current_setting('default_text_search_config')::regconfig::oid;" + ) + from([a, o] in q, where: fragment( - "to_tsvector(?->>'content') @@ websearch_to_tsquery(?)", + "to_tsvector(?::oid::regconfig, ?->>'content') @@ websearch_to_tsquery(?)", + ^tsc, o.data, ^search_query ) diff --git a/lib/pleroma/config/deprecation_warnings.ex b/lib/pleroma/config/deprecation_warnings.ex index fedd58a7e..029ee8b65 100644 --- a/lib/pleroma/config/deprecation_warnings.ex +++ b/lib/pleroma/config/deprecation_warnings.ex @@ -20,6 +20,140 @@ defmodule Pleroma.Config.DeprecationWarnings do "\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"} ] + def check_simple_policy_tuples do + has_strings = + Config.get([:mrf_simple]) + |> Enum.any?(fn {_, v} -> Enum.any?(v, &is_binary/1) end) + + if has_strings do + Logger.warn(""" + !!!DEPRECATION WARNING!!! + Your config is using strings in the SimplePolicy configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :mrf_simple, + media_removal: ["instance.tld"], + media_nsfw: ["instance.tld"], + federated_timeline_removal: ["instance.tld"], + report_removal: ["instance.tld"], + reject: ["instance.tld"], + followers_only: ["instance.tld"], + accept: ["instance.tld"], + avatar_removal: ["instance.tld"], + banner_removal: ["instance.tld"], + reject_deletes: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :mrf_simple, + media_removal: [{"instance.tld", "Reason for media removal"}], + media_nsfw: [{"instance.tld", "Reason for media nsfw"}], + federated_timeline_removal: [{"instance.tld", "Reason for federated timeline removal"}], + report_removal: [{"instance.tld", "Reason for report removal"}], + reject: [{"instance.tld", "Reason for reject"}], + followers_only: [{"instance.tld", "Reason for followers only"}], + accept: [{"instance.tld", "Reason for accept"}], + avatar_removal: [{"instance.tld", "Reason for avatar removal"}], + banner_removal: [{"instance.tld", "Reason for banner removal"}], + reject_deletes: [{"instance.tld", "Reason for reject deletes"}] + ``` + """) + + new_config = + Config.get([:mrf_simple]) + |> Enum.map(fn {k, v} -> + {k, + Enum.map(v, fn + {instance, reason} -> {instance, reason} + instance -> {instance, ""} + end)} + end) + + Config.put([:mrf_simple], new_config) + + :error + else + :ok + end + end + + def check_quarantined_instances_tuples do + has_strings = Config.get([:instance, :quarantined_instances]) |> Enum.any?(&is_binary/1) + + if has_strings do + Logger.warn(""" + !!!DEPRECATION WARNING!!! + Your config is using strings in the quarantined_instances configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :instance, + quarantined_instances: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :instance, + quarantined_instances: [{"instance.tld", "Reason for quarantine"}] + ``` + """) + + new_config = + Config.get([:instance, :quarantined_instances]) + |> Enum.map(fn + {instance, reason} -> {instance, reason} + instance -> {instance, ""} + end) + + Config.put([:instance, :quarantined_instances], new_config) + + :error + else + :ok + end + end + + def check_transparency_exclusions_tuples do + has_strings = Config.get([:mrf, :transparency_exclusions]) |> Enum.any?(&is_binary/1) + + if has_strings do + Logger.warn(""" + !!!DEPRECATION WARNING!!! + Your config is using strings in the transparency_exclusions configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :mrf, + transparency_exclusions: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :mrf, + transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}] + ``` + """) + + new_config = + Config.get([:mrf, :transparency_exclusions]) + |> Enum.map(fn + {instance, reason} -> {instance, reason} + instance -> {instance, ""} + end) + + Config.put([:mrf, :transparency_exclusions], new_config) + + :error + else + :ok + end + end + def check_hellthread_threshold do if Config.get([:mrf_hellthread, :threshold]) do Logger.warn(""" @@ -34,20 +168,24 @@ def check_hellthread_threshold do end def warn do - with :ok <- check_hellthread_threshold(), - :ok <- check_old_mrf_config(), - :ok <- check_media_proxy_whitelist_config(), - :ok <- check_welcome_message_config(), - :ok <- check_gun_pool_options(), - :ok <- check_activity_expiration_config(), - :ok <- check_remote_ip_plug_name(), - :ok <- check_uploders_s3_public_endpoint(), - :ok <- check_old_chat_shoutbox() do - :ok - else - _ -> - :error - end + [ + check_hellthread_threshold(), + check_old_mrf_config(), + check_media_proxy_whitelist_config(), + check_welcome_message_config(), + check_gun_pool_options(), + check_activity_expiration_config(), + check_remote_ip_plug_name(), + check_uploders_s3_public_endpoint(), + check_old_chat_shoutbox(), + check_quarantined_instances_tuples(), + check_transparency_exclusions_tuples(), + check_simple_policy_tuples() + ] + |> Enum.reduce(:ok, fn + :ok, :ok -> :ok + _, _ -> :error + end) end def check_welcome_message_config do diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 7efbdc49a..32f13df69 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -72,6 +72,7 @@ def unread_notifications_count(%User{id: user_id}) do pleroma:emoji_reaction pleroma:report reblog + poll } def changeset(%Notification{} = notification, attrs) do @@ -379,7 +380,7 @@ defp do_create_notifications(%Activity{} = activity, options) do notifications = Enum.map(potential_receivers, fn user -> do_send = do_send && user in enabled_receivers - create_notification(activity, user, do_send) + create_notification(activity, user, do_send: do_send) end) |> Enum.reject(&is_nil/1) @@ -435,15 +436,18 @@ defp type_from_activity_object(%{data: %{"type" => "Create"}} = activity) do end # TODO move to sql, too. - def create_notification(%Activity{} = activity, %User{} = user, do_send \\ true) do - unless skip?(activity, user) do + def create_notification(%Activity{} = activity, %User{} = user, opts \\ []) do + do_send = Keyword.get(opts, :do_send, true) + type = Keyword.get(opts, :type, type_from_activity(activity)) + + unless skip?(activity, user, opts) do {:ok, %{notification: notification}} = Multi.new() |> Multi.insert(:notification, %Notification{ user_id: user.id, activity: activity, seen: mark_as_read?(activity, user), - type: type_from_activity(activity) + type: type }) |> Marker.multi_set_last_read_id(user, "notifications") |> Repo.transaction() @@ -457,6 +461,28 @@ def create_notification(%Activity{} = activity, %User{} = user, do_send \\ true) end end + def create_poll_notifications(%Activity{} = activity) do + with %Object{data: %{"type" => "Question", "actor" => actor} = data} <- + Object.normalize(activity) do + voters = + case data do + %{"voters" => voters} when is_list(voters) -> voters + _ -> [] + end + + notifications = + Enum.reduce([actor | voters], [], fn ap_id, acc -> + with %User{local: true} = user <- User.get_by_ap_id(ap_id) do + [create_notification(activity, user, type: "poll") | acc] + else + _ -> acc + end + end) + + {:ok, notifications} + end + end + @doc """ Returns a tuple with 2 elements: {notification-enabled receivers, currently disabled receivers (blocking / [thread] muting)} @@ -572,8 +598,10 @@ def exclude_thread_muter_ap_ids(ap_ids, %Activity{} = activity) do Enum.uniq(ap_ids) -- thread_muter_ap_ids end - @spec skip?(Activity.t(), User.t()) :: boolean() - def skip?(%Activity{} = activity, %User{} = user) do + def skip?(activity, user, opts \\ []) + + @spec skip?(Activity.t(), User.t(), Keyword.t()) :: boolean() + def skip?(%Activity{} = activity, %User{} = user, opts) do [ :self, :invisible, @@ -581,17 +609,21 @@ def skip?(%Activity{} = activity, %User{} = user) do :recently_followed, :filtered ] - |> Enum.find(&skip?(&1, activity, user)) + |> Enum.find(&skip?(&1, activity, user, opts)) end - def skip?(_, _), do: false + def skip?(_activity, _user, _opts), do: false - @spec skip?(atom(), Activity.t(), User.t()) :: boolean() - def skip?(:self, %Activity{} = activity, %User{} = user) do - activity.data["actor"] == user.ap_id + @spec skip?(atom(), Activity.t(), User.t(), Keyword.t()) :: boolean() + def skip?(:self, %Activity{} = activity, %User{} = user, opts) do + cond do + opts[:type] == "poll" -> false + activity.data["actor"] == user.ap_id -> true + true -> false + end end - def skip?(:invisible, %Activity{} = activity, _) do + def skip?(:invisible, %Activity{} = activity, _user, _opts) do actor = activity.data["actor"] user = User.get_cached_by_ap_id(actor) User.invisible?(user) @@ -600,15 +632,27 @@ def skip?(:invisible, %Activity{} = activity, _) do def skip?( :block_from_strangers, %Activity{} = activity, - %User{notification_settings: %{block_from_strangers: true}} = user + %User{notification_settings: %{block_from_strangers: true}} = user, + opts ) do actor = activity.data["actor"] follower = User.get_cached_by_ap_id(actor) - !User.following?(follower, user) + + cond do + opts[:type] == "poll" -> false + user.ap_id == actor -> false + !User.following?(follower, user) -> true + true -> false + end end # To do: consider defining recency in hours and checking FollowingRelationship with a single SQL - def skip?(:recently_followed, %Activity{data: %{"type" => "Follow"}} = activity, %User{} = user) do + def skip?( + :recently_followed, + %Activity{data: %{"type" => "Follow"}} = activity, + %User{} = user, + _opts + ) do actor = activity.data["actor"] Notification.for_user(user) @@ -618,9 +662,10 @@ def skip?(:recently_followed, %Activity{data: %{"type" => "Follow"}} = activity, end) end - def skip?(:filtered, %{data: %{"type" => type}}, _) when type in ["Follow", "Move"], do: false + def skip?(:filtered, %{data: %{"type" => type}}, _user, _opts) when type in ["Follow", "Move"], + do: false - def skip?(:filtered, activity, user) do + def skip?(:filtered, activity, user, _opts) do object = Object.normalize(activity, fetch: false) cond do @@ -638,7 +683,7 @@ def skip?(:filtered, activity, user) do end end - def skip?(_, _, _), do: false + def skip?(_type, _activity, _user, _opts), do: false def mark_as_read?(activity, target_user) do user = Activity.user_actor(activity) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 4c29dda35..19961a4a5 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -25,6 +25,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do alias Pleroma.Web.Streamer alias Pleroma.Web.WebFinger alias Pleroma.Workers.BackgroundWorker + alias Pleroma.Workers.PollWorker import Ecto.Query import Pleroma.Web.ActivityPub.Utils @@ -288,6 +289,7 @@ defp do_create(%{to: to, actor: actor, context: context, object: object} = param {:quick_insert, false, activity} <- {:quick_insert, quick_insert?, activity}, {:ok, _actor} <- increase_note_count_if_public(actor, activity), _ <- notify_and_stream(activity), + :ok <- maybe_schedule_poll_notifications(activity), :ok <- maybe_federate(activity) do {:ok, activity} else @@ -302,6 +304,11 @@ defp do_create(%{to: to, actor: actor, context: context, object: object} = param end end + defp maybe_schedule_poll_notifications(activity) do + PollWorker.schedule_poll_end(activity) + :ok + end + @spec listen(map()) :: {:ok, Activity.t()} | {:error, any()} def listen(%{to: to, actor: actor, context: context, object: object} = params) do additional = params[:additional] || %{} diff --git a/lib/pleroma/web/activity_pub/builder.ex b/lib/pleroma/web/activity_pub/builder.ex index cde477710..647ccf432 100644 --- a/lib/pleroma/web/activity_pub/builder.ex +++ b/lib/pleroma/web/activity_pub/builder.ex @@ -15,6 +15,7 @@ defmodule Pleroma.Web.ActivityPub.Builder do alias Pleroma.Web.ActivityPub.Relay alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.ActivityPub.Visibility + alias Pleroma.Web.CommonAPI.ActivityDraft require Pleroma.Constants @@ -125,6 +126,37 @@ def create(actor, object, recipients) do |> Pleroma.Maps.put_if_present("context", context), []} end + @spec note(ActivityDraft.t()) :: {:ok, map(), keyword()} + def note(%ActivityDraft{} = draft) do + data = + %{ + "type" => "Note", + "to" => draft.to, + "cc" => draft.cc, + "content" => draft.content_html, + "summary" => draft.summary, + "sensitive" => draft.sensitive, + "context" => draft.context, + "attachment" => draft.attachments, + "actor" => draft.user.ap_id, + "tag" => Keyword.values(draft.tags) |> Enum.uniq() + } + |> add_in_reply_to(draft.in_reply_to) + |> Map.merge(draft.extra) + + {:ok, data, []} + end + + defp add_in_reply_to(object, nil), do: object + + defp add_in_reply_to(object, in_reply_to) do + with %Object{} = in_reply_to_object <- Object.normalize(in_reply_to, fetch: false) do + Map.put(object, "inReplyTo", in_reply_to_object.data["id"]) + else + _ -> object + end + end + def chat_message(actor, recipient, content, opts \\ []) do basic = %{ "id" => Utils.generate_object_id(), diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex index ac00fa54b..e4ee8fe82 100644 --- a/lib/pleroma/web/activity_pub/mrf.ex +++ b/lib/pleroma/web/activity_pub/mrf.ex @@ -21,7 +21,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do type: [:module, {:list, :module}], description: "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.", - suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF} + suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF.Policy} }, %{ key: :transparency, @@ -33,9 +33,11 @@ defmodule Pleroma.Web.ActivityPub.MRF do %{ key: :transparency_exclusions, label: "MRF transparency exclusions", - type: {:list, :string}, + type: {:list, :tuple}, + key_placeholder: "instance", + value_placeholder: "reason", description: - "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.", + "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. You can also provide a reason for excluding these instance names. The instances and reasons won't be publicly disclosed.", suggestions: [ "exclusion.com" ] @@ -100,6 +102,11 @@ def subdomain_match?(domains, host) do Enum.any?(domains, fn domain -> Regex.match?(domain, host) end) end + @spec instance_list_from_tuples([{String.t(), String.t()}]) :: [String.t()] + def instance_list_from_tuples(list) do + Enum.map(list, fn {instance, _} -> instance end) + end + def describe(policies) do {:ok, policy_configs} = policies diff --git a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex index 646008dd9..1383fa757 100644 --- a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex @@ -159,6 +159,8 @@ def config_description do %{ key: :replace, type: {:list, :tuple}, + key_placeholder: "instance", + value_placeholder: "reason", description: """ **Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. diff --git a/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex b/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex index 9a211fd44..02c9b18ed 100644 --- a/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex @@ -49,6 +49,8 @@ defp check_delist(message, actions) do message |> Map.put("to", to) |> Map.put("cc", cc) + |> Kernel.put_in(["object", "to"], to) + |> Kernel.put_in(["object", "cc"], cc) {:ok, message} else @@ -70,6 +72,8 @@ defp check_strip_followers(message, actions) do message |> Map.put("to", to) |> Map.put("cc", cc) + |> Kernel.put_in(["object", "to"], to) + |> Kernel.put_in(["object", "cc"], cc) {:ok, message} else @@ -82,7 +86,7 @@ defp check_strip_followers(message, actions) do end @impl true - def filter(%{"type" => "Create", "published" => _} = message) do + def filter(%{"type" => "Create", "object" => %{"published" => _}} = message) do with actions <- Config.get([:mrf_object_age, :actions]), {:reject, _} <- check_date(message), {:ok, message} <- check_reject(message, actions), diff --git a/lib/pleroma/web/activity_pub/mrf/reject_non_public.ex b/lib/pleroma/web/activity_pub/mrf/reject_non_public.ex index b9d3e52c7..dbb7ca0df 100644 --- a/lib/pleroma/web/activity_pub/mrf/reject_non_public.ex +++ b/lib/pleroma/web/activity_pub/mrf/reject_non_public.ex @@ -47,7 +47,7 @@ def filter(object), do: {:ok, object} @impl true def describe, - do: {:ok, %{mrf_rejectnonpublic: Config.get(:mrf_rejectnonpublic) |> Enum.into(%{})}} + do: {:ok, %{mrf_rejectnonpublic: Config.get(:mrf_rejectnonpublic) |> Map.new()}} @impl true def config_description do diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index 30562ac08..c631cc85f 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -15,7 +15,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do defp check_accept(%{host: actor_host} = _actor_info, object) do accepts = - Config.get([:mrf_simple, :accept]) + instance_list(:accept) |> MRF.subdomains_regex() cond do @@ -28,7 +28,7 @@ defp check_accept(%{host: actor_host} = _actor_info, object) do defp check_reject(%{host: actor_host} = _actor_info, object) do rejects = - Config.get([:mrf_simple, :reject]) + instance_list(:reject) |> MRF.subdomains_regex() if MRF.subdomain_match?(rejects, actor_host) do @@ -44,7 +44,7 @@ defp check_media_removal( ) when length(child_attachment) > 0 do media_removal = - Config.get([:mrf_simple, :media_removal]) + instance_list(:media_removal) |> MRF.subdomains_regex() object = @@ -68,7 +68,7 @@ defp check_media_nsfw( } = object ) do media_nsfw = - Config.get([:mrf_simple, :media_nsfw]) + instance_list(:media_nsfw) |> MRF.subdomains_regex() object = @@ -85,7 +85,7 @@ defp check_media_nsfw(_actor_info, object), do: {:ok, object} defp check_ftl_removal(%{host: actor_host} = _actor_info, object) do timeline_removal = - Config.get([:mrf_simple, :federated_timeline_removal]) + instance_list(:federated_timeline_removal) |> MRF.subdomains_regex() object = @@ -112,7 +112,7 @@ defp intersection(list1, list2) do defp check_followers_only(%{host: actor_host} = _actor_info, object) do followers_only = - Config.get([:mrf_simple, :followers_only]) + instance_list(:followers_only) |> MRF.subdomains_regex() object = @@ -137,7 +137,7 @@ defp check_followers_only(%{host: actor_host} = _actor_info, object) do defp check_report_removal(%{host: actor_host} = _actor_info, %{"type" => "Flag"} = object) do report_removal = - Config.get([:mrf_simple, :report_removal]) + instance_list(:report_removal) |> MRF.subdomains_regex() if MRF.subdomain_match?(report_removal, actor_host) do @@ -151,7 +151,7 @@ defp check_report_removal(_actor_info, object), do: {:ok, object} defp check_avatar_removal(%{host: actor_host} = _actor_info, %{"icon" => _icon} = object) do avatar_removal = - Config.get([:mrf_simple, :avatar_removal]) + instance_list(:avatar_removal) |> MRF.subdomains_regex() if MRF.subdomain_match?(avatar_removal, actor_host) do @@ -165,7 +165,7 @@ defp check_avatar_removal(_actor_info, object), do: {:ok, object} defp check_banner_removal(%{host: actor_host} = _actor_info, %{"image" => _image} = object) do banner_removal = - Config.get([:mrf_simple, :banner_removal]) + instance_list(:banner_removal) |> MRF.subdomains_regex() if MRF.subdomain_match?(banner_removal, actor_host) do @@ -185,12 +185,17 @@ defp check_object(%{"object" => object} = activity) do defp check_object(object), do: {:ok, object} + defp instance_list(config_key) do + Config.get([:mrf_simple, config_key]) + |> MRF.instance_list_from_tuples() + end + @impl true def filter(%{"type" => "Delete", "actor" => actor} = object) do %{host: actor_host} = URI.parse(actor) reject_deletes = - Config.get([:mrf_simple, :reject_deletes]) + instance_list(:reject_deletes) |> MRF.subdomains_regex() if MRF.subdomain_match?(reject_deletes, actor_host) do @@ -253,14 +258,42 @@ def filter(object), do: {:ok, object} @impl true def describe do - exclusions = Config.get([:mrf, :transparency_exclusions]) + exclusions = Config.get([:mrf, :transparency_exclusions]) |> MRF.instance_list_from_tuples() + + mrf_simple_excluded = + Config.get(:mrf_simple) + |> Enum.map(fn {rule, instances} -> + {rule, Enum.reject(instances, fn {host, _} -> host in exclusions end)} + end) mrf_simple = - Config.get(:mrf_simple) - |> Enum.map(fn {k, v} -> {k, Enum.reject(v, fn v -> v in exclusions end)} end) - |> Enum.into(%{}) + mrf_simple_excluded + |> Enum.map(fn {rule, instances} -> + {rule, Enum.map(instances, fn {host, _} -> host end)} + end) + |> Map.new() - {:ok, %{mrf_simple: mrf_simple}} + # This is for backwards compatibility. We originally didn't sent + # extra info like a reason why an instance was rejected/quarantined/etc. + # Because we didn't want to break backwards compatibility it was decided + # to add an extra "info" key. + mrf_simple_info = + mrf_simple_excluded + |> Enum.map(fn {rule, instances} -> + {rule, Enum.reject(instances, fn {_, reason} -> reason == "" end)} + end) + |> Enum.reject(fn {_, instances} -> instances == [] end) + |> Enum.map(fn {rule, instances} -> + instances = + instances + |> Enum.map(fn {host, reason} -> {host, %{"reason" => reason}} end) + |> Map.new() + + {rule, instances} + end) + |> Map.new() + + {:ok, %{mrf_simple: mrf_simple, mrf_simple_info: mrf_simple_info}} end @impl true @@ -270,70 +303,67 @@ def config_description do related_policy: "Pleroma.Web.ActivityPub.MRF.SimplePolicy", label: "MRF Simple", description: "Simple ingress policies", - children: [ - %{ - key: :media_removal, - type: {:list, :string}, - description: "List of instances to strip media attachments from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :media_nsfw, - label: "Media NSFW", - type: {:list, :string}, - description: "List of instances to tag all media as NSFW (sensitive) from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :federated_timeline_removal, - type: {:list, :string}, - description: - "List of instances to remove from the Federated (aka The Whole Known Network) Timeline", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :reject, - type: {:list, :string}, - description: "List of instances to reject activities from (except deletes)", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :accept, - type: {:list, :string}, - description: "List of instances to only accept activities from (except deletes)", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :followers_only, - type: {:list, :string}, - description: "Force posts from the given instances to be visible by followers only", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :report_removal, - type: {:list, :string}, - description: "List of instances to reject reports from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :avatar_removal, - type: {:list, :string}, - description: "List of instances to strip avatars from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :banner_removal, - type: {:list, :string}, - description: "List of instances to strip banners from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :reject_deletes, - type: {:list, :string}, - description: "List of instances to reject deletions from", - suggestions: ["example.com", "*.example.com"] - } - ] + children: + [ + %{ + key: :media_removal, + description: + "List of instances to strip media attachments from and the reason for doing so" + }, + %{ + key: :media_nsfw, + label: "Media NSFW", + description: + "List of instances to tag all media as NSFW (sensitive) from and the reason for doing so" + }, + %{ + key: :federated_timeline_removal, + description: + "List of instances to remove from the Federated (aka The Whole Known Network) Timeline and the reason for doing so" + }, + %{ + key: :reject, + description: + "List of instances to reject activities from (except deletes) and the reason for doing so" + }, + %{ + key: :accept, + description: + "List of instances to only accept activities from (except deletes) and the reason for doing so" + }, + %{ + key: :followers_only, + description: + "Force posts from the given instances to be visible by followers only and the reason for doing so" + }, + %{ + key: :report_removal, + description: "List of instances to reject reports from and the reason for doing so" + }, + %{ + key: :avatar_removal, + description: "List of instances to strip avatars from and the reason for doing so" + }, + %{ + key: :banner_removal, + description: "List of instances to strip banners from and the reason for doing so" + }, + %{ + key: :reject_deletes, + description: "List of instances to reject deletions from and the reason for doing so" + } + ] + |> Enum.map(fn setting -> + Map.merge( + setting, + %{ + type: {:list, :tuple}, + key_placeholder: "instance", + value_placeholder: "reason", + suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] + } + ) + end) } end end diff --git a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex index c28f14a41..fbe9795ac 100644 --- a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex @@ -92,6 +92,51 @@ def filter(%{"object" => %{"emoji" => foreign_emojis, "actor" => actor}} = messa def filter(message), do: {:ok, message} + @impl true + @spec config_description :: %{ + children: [ + %{ + description: <<_::272, _::_*256>>, + key: :hosts | :rejected_shortcodes | :size_limit, + suggestions: [any(), ...], + type: {:list, :string} | {:list, :string} | :integer + }, + ... + ], + description: <<_::448>>, + key: :mrf_steal_emoji, + label: <<_::80>>, + related_policy: <<_::352>> + } + def config_description do + %{ + key: :mrf_steal_emoji, + related_policy: "Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy", + label: "MRF Emojis", + description: "Steals emojis from selected instances when it sees them.", + children: [ + %{ + key: :hosts, + type: {:list, :string}, + description: "List of hosts to steal emojis from", + suggestions: [""] + }, + %{ + key: :rejected_shortcodes, + type: {:list, :string}, + description: "Regex-list of shortcodes to reject", + suggestions: [""] + }, + %{ + key: :size_limit, + type: :integer, + description: "File size limit (in bytes), checked before an emoji is saved to the disk", + suggestions: ["100000"] + } + ] + } + end + @impl true def describe do {:ok, %{}} diff --git a/lib/pleroma/web/activity_pub/mrf/user_allow_list_policy.ex b/lib/pleroma/web/activity_pub/mrf/user_allow_list_policy.ex index 1bcb3688b..52fb02a84 100644 --- a/lib/pleroma/web/activity_pub/mrf/user_allow_list_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/user_allow_list_policy.ex @@ -37,7 +37,7 @@ def filter(object), do: {:ok, object} def describe do mrf_user_allowlist = Config.get([:mrf_user_allowlist], []) - |> Enum.into(%{}, fn {k, v} -> {k, length(v)} end) + |> Map.new(fn {k, v} -> {k, length(v)} end) {:ok, %{mrf_user_allowlist: mrf_user_allowlist}} end diff --git a/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex b/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex index 20f57f609..602e10b44 100644 --- a/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/vocabulary_policy.ex @@ -39,7 +39,7 @@ def filter(message), do: {:ok, message} @impl true def describe, - do: {:ok, %{mrf_vocabulary: Pleroma.Config.get(:mrf_vocabulary) |> Enum.into(%{})}} + do: {:ok, %{mrf_vocabulary: Pleroma.Config.get(:mrf_vocabulary) |> Map.new()}} @impl true def config_description do diff --git a/lib/pleroma/web/activity_pub/object_validator.ex b/lib/pleroma/web/activity_pub/object_validator.ex index 6e40d8b72..187cd0cfd 100644 --- a/lib/pleroma/web/activity_pub/object_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validator.ex @@ -213,6 +213,7 @@ def stringify_keys(%{__struct__: _} = object) do def stringify_keys(object) when is_map(object) do object + |> Enum.filter(fn {_, v} -> v != nil end) |> Map.new(fn {key, val} -> {to_string(key), stringify_keys(val)} end) end diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex index 590beef64..4f29a4411 100644 --- a/lib/pleroma/web/activity_pub/publisher.ex +++ b/lib/pleroma/web/activity_pub/publisher.ex @@ -112,6 +112,7 @@ defp should_federate?(inbox, public) do quarantined_instances = Config.get([:instance, :quarantined_instances], []) + |> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples() |> Pleroma.Web.ActivityPub.MRF.subdomains_regex() !Pleroma.Web.ActivityPub.MRF.subdomain_match?(quarantined_instances, host) diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex index b0ec84ade..701181a14 100644 --- a/lib/pleroma/web/activity_pub/side_effects.ex +++ b/lib/pleroma/web/activity_pub/side_effects.ex @@ -10,7 +10,6 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do collection, and so on. """ alias Pleroma.Activity - alias Pleroma.Activity.Ir.Topics alias Pleroma.Chat alias Pleroma.Chat.MessageReference alias Pleroma.FollowingRelationship @@ -24,6 +23,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.Push alias Pleroma.Web.Streamer + alias Pleroma.Workers.PollWorker require Logger @@ -195,7 +195,7 @@ def handle(%{data: %{"type" => "Like"}} = object, meta) do # - Set up notifications @impl true def handle(%{data: %{"type" => "Create"}} = activity, meta) do - with {:ok, object, meta} <- handle_object_creation(meta[:object_data], meta), + with {:ok, object, meta} <- handle_object_creation(meta[:object_data], activity, meta), %User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do {:ok, notifications} = Notification.create_notifications(activity, do_send: false) {:ok, _user} = ActivityPub.increase_note_count_if_public(user, object) @@ -225,6 +225,8 @@ def handle(%{data: %{"type" => "Create"}} = activity, meta) do meta |> add_notifications(notifications) + ap_streamer().stream_out(activity) + {:ok, activity, meta} else e -> Repo.rollback(e) @@ -245,9 +247,7 @@ def handle(%{data: %{"type" => "Announce"}} = object, meta) do if !User.is_internal_user?(user) do Notification.create_notifications(object) - object - |> Topics.get_activity_topics() - |> Streamer.stream(object) + ap_streamer().stream_out(object) end {:ok, object, meta} @@ -389,7 +389,7 @@ def handle(object, meta) do {:ok, object, meta} end - def handle_object_creation(%{"type" => "ChatMessage"} = object, meta) do + def handle_object_creation(%{"type" => "ChatMessage"} = object, _activity, meta) do with {:ok, object, meta} <- Pipeline.common_pipeline(object, meta) do actor = User.get_cached_by_ap_id(object.data["actor"]) recipient = User.get_cached_by_ap_id(hd(object.data["to"])) @@ -424,7 +424,14 @@ def handle_object_creation(%{"type" => "ChatMessage"} = object, meta) do end end - def handle_object_creation(%{"type" => "Answer"} = object_map, meta) do + def handle_object_creation(%{"type" => "Question"} = object, activity, meta) do + with {:ok, object, meta} <- Pipeline.common_pipeline(object, meta) do + PollWorker.schedule_poll_end(activity) + {:ok, object, meta} + end + end + + def handle_object_creation(%{"type" => "Answer"} = object_map, _activity, meta) do with {:ok, object, meta} <- Pipeline.common_pipeline(object_map, meta) do Object.increase_vote_count( object.data["inReplyTo"], @@ -436,15 +443,15 @@ def handle_object_creation(%{"type" => "Answer"} = object_map, meta) do end end - def handle_object_creation(%{"type" => objtype} = object, meta) - when objtype in ~w[Audio Video Question Event Article Note Page] do + def handle_object_creation(%{"type" => objtype} = object, _activity, meta) + when objtype in ~w[Audio Video Event Article Note Page] do with {:ok, object, meta} <- Pipeline.common_pipeline(object, meta) do {:ok, object, meta} end end # Nothing to do - def handle_object_creation(object, meta) do + def handle_object_creation(object, _activity, meta) do {:ok, object, meta} end diff --git a/lib/pleroma/web/admin_api/controllers/frontend_controller.ex b/lib/pleroma/web/admin_api/controllers/frontend_controller.ex index 722f51bd2..442e6a5a0 100644 --- a/lib/pleroma/web/admin_api/controllers/frontend_controller.ex +++ b/lib/pleroma/web/admin_api/controllers/frontend_controller.ex @@ -35,6 +35,12 @@ def install(%{body_params: params} = conn, _params) do end defp installed do - File.ls!(Pleroma.Frontend.dir()) + frontend_directory = Pleroma.Frontend.dir() + + if File.exists?(frontend_directory) do + File.ls!(frontend_directory) + else + [] + end end end diff --git a/lib/pleroma/web/admin_api/report.ex b/lib/pleroma/web/admin_api/report.ex index 259068f04..345bc1e87 100644 --- a/lib/pleroma/web/admin_api/report.ex +++ b/lib/pleroma/web/admin_api/report.ex @@ -13,7 +13,9 @@ def extract_report_info( account = User.get_cached_by_ap_id(account_ap_id) statuses = - Enum.map(status_ap_ids, fn + status_ap_ids + |> Enum.reject(&is_nil(&1)) + |> Enum.map(fn act when is_map(act) -> Activity.get_by_ap_id_with_object(act["id"]) act when is_binary(act) -> Activity.get_by_ap_id_with_object(act) end) diff --git a/lib/pleroma/web/api_spec/operations/notification_operation.ex b/lib/pleroma/web/api_spec/operations/notification_operation.ex index ec88eabe1..e4ce42f1c 100644 --- a/lib/pleroma/web/api_spec/operations/notification_operation.ex +++ b/lib/pleroma/web/api_spec/operations/notification_operation.ex @@ -195,7 +195,8 @@ defp notification_type do "pleroma:chat_mention", "pleroma:report", "move", - "follow_request" + "follow_request", + "poll" ], description: """ The type of event that resulted in the notification. diff --git a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex index 0cafbc719..879b2227e 100644 --- a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex +++ b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex @@ -8,6 +8,8 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do alias Pleroma.Web.ApiSpec.Schemas.ApiError alias Pleroma.Web.ApiSpec.Schemas.BooleanLike + import Pleroma.Web.ApiSpec.Helpers + def open_api_operation(action) do operation = String.to_existing_atom("#{action}_operation") apply(__MODULE__, operation, []) @@ -63,17 +65,7 @@ def change_password_operation do summary: "Change account password", security: [%{"oAuth" => ["write:accounts"]}], operationId: "UtilController.change_password", - parameters: [ - Operation.parameter(:password, :query, :string, "Current password", required: true), - Operation.parameter(:new_password, :query, :string, "New password", required: true), - Operation.parameter( - :new_password_confirmation, - :query, - :string, - "New password, confirmation", - required: true - ) - ], + requestBody: request_body("Parameters", change_password_request(), required: true), responses: %{ 200 => Operation.response("Success", "application/json", %Schema{ @@ -86,17 +78,30 @@ def change_password_operation do } end + defp change_password_request do + %Schema{ + title: "ChangePasswordRequest", + description: "POST body for changing the account's passowrd", + type: :object, + required: [:password, :new_password, :new_password_confirmation], + properties: %{ + password: %Schema{type: :string, description: "Current password"}, + new_password: %Schema{type: :string, description: "New password"}, + new_password_confirmation: %Schema{ + type: :string, + description: "New password, confirmation" + } + } + } + end + def change_email_operation do %Operation{ tags: ["Account credentials"], summary: "Change account email", security: [%{"oAuth" => ["write:accounts"]}], operationId: "UtilController.change_email", - parameters: [ - Operation.parameter(:password, :query, :string, "Current password", required: true), - Operation.parameter(:email, :query, :string, "New email", required: true) - ], - requestBody: nil, + requestBody: request_body("Parameters", change_email_request(), required: true), responses: %{ 200 => Operation.response("Success", "application/json", %Schema{ @@ -109,6 +114,19 @@ def change_email_operation do } end + defp change_email_request do + %Schema{ + title: "ChangeEmailRequest", + description: "POST body for changing the account's email", + type: :object, + required: [:email, :password], + properties: %{ + email: %Schema{type: :string, description: "New email"}, + password: %Schema{type: :string, description: "Current password"} + } + } + end + def update_notificaton_settings_operation do %Operation{ tags: ["Accounts"], diff --git a/lib/pleroma/web/common_api/activity_draft.ex b/lib/pleroma/web/common_api/activity_draft.ex index c691d71d2..b4e3e37ae 100644 --- a/lib/pleroma/web/common_api/activity_draft.ex +++ b/lib/pleroma/web/common_api/activity_draft.ex @@ -6,6 +6,7 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do alias Pleroma.Activity alias Pleroma.Conversation.Participation alias Pleroma.Object + alias Pleroma.Web.ActivityPub.Builder alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI.Utils @@ -213,8 +214,10 @@ defp object(draft) do emoji = Map.merge(emoji, summary_emoji) + {:ok, note_data, _meta} = Builder.note(draft) + object = - Utils.make_note_data(draft) + note_data |> Map.put("emoji", emoji) |> Map.put("source", draft.status) |> Map.put("generator", draft.params[:generator]) diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 33639e695..b6feaf32a 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -291,33 +291,6 @@ def format_input(text, "text/markdown", options) do |> Formatter.html_escape("text/html") end - def make_note_data(%ActivityDraft{} = draft) do - %{ - "type" => "Note", - "to" => draft.to, - "cc" => draft.cc, - "content" => draft.content_html, - "summary" => draft.summary, - "sensitive" => draft.sensitive, - "context" => draft.context, - "attachment" => draft.attachments, - "actor" => draft.user.ap_id, - "tag" => Keyword.values(draft.tags) |> Enum.uniq() - } - |> add_in_reply_to(draft.in_reply_to) - |> Map.merge(draft.extra) - end - - defp add_in_reply_to(object, nil), do: object - - defp add_in_reply_to(object, in_reply_to) do - with %Object{} = in_reply_to_object <- Object.normalize(in_reply_to, fetch: false) do - Map.put(object, "inReplyTo", in_reply_to_object.data["id"]) - else - _ -> object - end - end - def format_naive_asctime(date) do date |> DateTime.from_naive!("Etc/UTC") |> format_asctime end @@ -412,19 +385,14 @@ def maybe_notify_mentioned_recipients( def maybe_notify_mentioned_recipients(recipients, _), do: recipients - # Do not notify subscribers if author is making a reply - def maybe_notify_subscribers(recipients, %Activity{ - object: %Object{data: %{"inReplyTo" => _ap_id}} - }) do - recipients - end - def maybe_notify_subscribers( recipients, - %Activity{data: %{"actor" => actor, "type" => type}} = activity - ) - when type == "Create" do - with %User{} = user <- User.get_cached_by_ap_id(actor) do + %Activity{data: %{"actor" => actor, "type" => "Create"}} = activity + ) do + # Do not notify subscribers if author is making a reply + with %Object{data: object} <- Object.normalize(activity, fetch: false), + nil <- object["inReplyTo"], + %User{} = user <- User.get_cached_by_ap_id(actor) do subscriber_ids = user |> User.subscriber_users() diff --git a/lib/pleroma/web/mastodon_api/controllers/notification_controller.ex b/lib/pleroma/web/mastodon_api/controllers/notification_controller.ex index 647ba661e..002d6b2ce 100644 --- a/lib/pleroma/web/mastodon_api/controllers/notification_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/notification_controller.ex @@ -50,6 +50,7 @@ def index(conn, %{account_id: account_id} = params) do favourite move pleroma:emoji_reaction + poll } def index(%{assigns: %{user: user}} = conn, params) do params = diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index 3528185d5..ef208062b 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -95,7 +95,20 @@ def federation do {:ok, data} = MRF.describe() data - |> Map.merge(%{quarantined_instances: quarantined}) + |> Map.put( + :quarantined_instances, + Enum.map(quarantined, fn {instance, _reason} -> instance end) + ) + # This is for backwards compatibility. We originally didn't sent + # extra info like a reason why an instance was rejected/quarantined/etc. + # Because we didn't want to break backwards compatibility it was decided + # to add an extra "info" key. + |> Map.put(:quarantined_instances_info, %{ + "quarantined_instances" => + quarantined + |> Enum.map(fn {instance, reason} -> {instance, %{"reason" => reason}} end) + |> Map.new() + }) else %{} end diff --git a/lib/pleroma/web/mastodon_api/views/notification_view.ex b/lib/pleroma/web/mastodon_api/views/notification_view.ex index df9bedfed..35c636d4e 100644 --- a/lib/pleroma/web/mastodon_api/views/notification_view.ex +++ b/lib/pleroma/web/mastodon_api/views/notification_view.ex @@ -112,6 +112,9 @@ def render( "move" -> put_target(response, activity, reading_user, %{}) + "poll" -> + put_status(response, activity, reading_user, status_render_opts) + "pleroma:emoji_reaction" -> response |> put_status(parent_activity_fn.(), reading_user, status_render_opts) diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index da44e0a74..463f34198 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -65,11 +65,19 @@ defp get_context_id(%{data: %{"context" => context}}) when is_binary(context), defp get_context_id(_), do: nil - defp reblogged?(activity, user) do - object = Object.normalize(activity, fetch: false) || %{} - present?(user && user.ap_id in (object.data["announcements"] || [])) + # Check if the user reblogged this status + defp reblogged?(activity, %User{ap_id: ap_id}) do + with %Object{data: %{"announcements" => announcements}} when is_list(announcements) <- + Object.normalize(activity, fetch: false) do + ap_id in announcements + else + _ -> false + end end + # False if the user is logged out + defp reblogged?(_activity, _user), do: false + def render("index.json", opts) do reading_user = opts[:for] diff --git a/lib/pleroma/web/push/impl.ex b/lib/pleroma/web/push/impl.ex index 83cbdc870..28e13ef9c 100644 --- a/lib/pleroma/web/push/impl.ex +++ b/lib/pleroma/web/push/impl.ex @@ -124,8 +124,8 @@ def build_content(notification, actor, object, mastodon_type) do def format_body(activity, actor, object, mastodon_type \\ nil) - def format_body(_activity, actor, %{data: %{"type" => "ChatMessage", "content" => content}}, _) do - case content do + def format_body(_activity, actor, %{data: %{"type" => "ChatMessage"} = data}, _) do + case data["content"] do nil -> "@#{actor.nickname}: (Attachment)" content -> "@#{actor.nickname}: #{Utils.scrub_html_and_truncate(content, 80)}" end diff --git a/lib/pleroma/web/push/subscription.ex b/lib/pleroma/web/push/subscription.ex index 4f6c9bc9f..35bf2e223 100644 --- a/lib/pleroma/web/push/subscription.ex +++ b/lib/pleroma/web/push/subscription.ex @@ -26,7 +26,7 @@ defmodule Pleroma.Web.Push.Subscription do end # credo:disable-for-next-line Credo.Check.Readability.MaxLineLength - @supported_alert_types ~w[follow favourite mention reblog pleroma:chat_mention pleroma:emoji_reaction]a + @supported_alert_types ~w[follow favourite mention reblog poll pleroma:chat_mention pleroma:emoji_reaction]a defp alerts(%{data: %{alerts: alerts}}) do alerts = Map.take(alerts, @supported_alert_types) diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index a2e69666e..ef43f7682 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -81,17 +81,13 @@ def update_notificaton_settings(%{assigns: %{user: user}} = conn, params) do end end - def change_password(%{assigns: %{user: user}} = conn, %{ - password: password, - new_password: new_password, - new_password_confirmation: new_password_confirmation - }) do - case CommonAPI.Utils.confirm_current_password(user, password) do + def change_password(%{assigns: %{user: user}, body_params: body_params} = conn, %{}) do + case CommonAPI.Utils.confirm_current_password(user, body_params.password) do {:ok, user} -> with {:ok, _user} <- User.reset_password(user, %{ - password: new_password, - password_confirmation: new_password_confirmation + password: body_params.new_password, + password_confirmation: body_params.new_password_confirmation }) do json(conn, %{status: "success"}) else @@ -108,10 +104,10 @@ def change_password(%{assigns: %{user: user}} = conn, %{ end end - def change_email(%{assigns: %{user: user}} = conn, %{password: password, email: email}) do - case CommonAPI.Utils.confirm_current_password(user, password) do + def change_email(%{assigns: %{user: user}, body_params: body_params} = conn, %{}) do + case CommonAPI.Utils.confirm_current_password(user, body_params.password) do {:ok, user} -> - with {:ok, _user} <- User.change_email(user, email) do + with {:ok, _user} <- User.change_email(user, body_params.email) do json(conn, %{status: "success"}) else {:error, changeset} -> diff --git a/lib/pleroma/workers/poll_worker.ex b/lib/pleroma/workers/poll_worker.ex new file mode 100644 index 000000000..3423cc889 --- /dev/null +++ b/lib/pleroma/workers/poll_worker.ex @@ -0,0 +1,45 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2021 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Workers.PollWorker do + @moduledoc """ + Generates notifications when a poll ends. + """ + use Pleroma.Workers.WorkerHelper, queue: "poll_notifications" + + alias Pleroma.Activity + alias Pleroma.Notification + alias Pleroma.Object + + @impl Oban.Worker + def perform(%Job{args: %{"op" => "poll_end", "activity_id" => activity_id}}) do + with %Activity{} = activity <- find_poll_activity(activity_id) do + Notification.create_poll_notifications(activity) + end + end + + defp find_poll_activity(activity_id) do + with nil <- Activity.get_by_id(activity_id) do + {:error, :poll_activity_not_found} + end + end + + def schedule_poll_end(%Activity{data: %{"type" => "Create"}, id: activity_id} = activity) do + with %Object{data: %{"type" => "Question", "closed" => closed}} when is_binary(closed) <- + Object.normalize(activity), + {:ok, end_time} <- NaiveDateTime.from_iso8601(closed), + :gt <- NaiveDateTime.compare(end_time, NaiveDateTime.utc_now()) do + %{ + op: "poll_end", + activity_id: activity_id + } + |> new(scheduled_at: end_time) + |> Oban.insert() + else + _ -> {:error, activity} + end + end + + def schedule_poll_end(activity), do: {:error, activity} +end diff --git a/mix.exs b/mix.exs index 1a7aac6a4..89c3f8473 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do def project do [ app: :pleroma, - version: version("2.3.50"), + version: version("2.4.51"), elixir: "~> 1.9", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), diff --git a/priv/gettext/pl/LC_MESSAGES/errors.po b/priv/gettext/pl/LC_MESSAGES/errors.po index 653ea00a1..4d689902f 100644 --- a/priv/gettext/pl/LC_MESSAGES/errors.po +++ b/priv/gettext/pl/LC_MESSAGES/errors.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-13 16:37+0000\n" -"PO-Revision-Date: 2020-07-09 14:40+0000\n" -"Last-Translator: Ben Is \n" +"PO-Revision-Date: 2021-08-13 15:42+0000\n" +"Last-Translator: marcin mikołajczak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -13,7 +13,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.6.2\n" ## This file is a PO Template file. ## @@ -68,49 +68,49 @@ msgstr[2] "powinno mieć %{count} znaków" msgid "should have %{count} item(s)" msgid_plural "should have %{count} item(s)" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "powinno zawierać %{count} element" +msgstr[1] "powinno zawierać %{count} elementy" +msgstr[2] "powinno zawierać %{count} elementów" msgid "should be at least %{count} character(s)" msgid_plural "should be at least %{count} character(s)" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "powinno zawierać przynajmniej %{count} znak" +msgstr[1] "powinno zawierać przynajmniej %{count} znaki" +msgstr[2] "powinno zawierać przynajmniej %{count} znaków" msgid "should have at least %{count} item(s)" msgid_plural "should have at least %{count} item(s)" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "powinno zawierać przynajmniej %{count} element" +msgstr[1] "powinno zawierać przynajmniej %{count} elementy" +msgstr[2] "powinno zawierać przynajmniej %{count} elementów" msgid "should be at most %{count} character(s)" msgid_plural "should be at most %{count} character(s)" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "powinno zawierać najwyżej %{count} znak" +msgstr[1] "powinno zawierać najwyżej %{count} znaki" +msgstr[2] "powinno zawierać najwyżej %{count} znaków" msgid "should have at most %{count} item(s)" msgid_plural "should have at most %{count} item(s)" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "powinno zawierać najwyżej %{count} element" +msgstr[1] "powinno zawierać najwyżej %{count} elementy" +msgstr[2] "powinno zawierać najwyżej %{count} elementów" ## From Ecto.Changeset.validate_number/3 msgid "must be less than %{number}" -msgstr "" +msgstr "musi wynosić mniej niż %{number}" msgid "must be greater than %{number}" -msgstr "" +msgstr "musi wynosić więcej niż %{number}" msgid "must be less than or equal to %{number}" -msgstr "" +msgstr "musi być mniejsze lub równe %{number}" msgid "must be greater than or equal to %{number}" -msgstr "" +msgstr "musi być większe lub równe %{number}" msgid "must be equal to %{number}" -msgstr "" +msgstr "musi być równe %{number}" #: lib/pleroma/web/common_api/common_api.ex:421 #, elixir-format @@ -152,7 +152,7 @@ msgstr "Nie znaleziono użytkownika" #: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:114 #, elixir-format msgid "Can't get favorites" -msgstr "" +msgstr "Nie można uzyskać ulubionych" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:437 #, elixir-format @@ -172,7 +172,7 @@ msgstr "Komentarz może mieć co najwyżej %{max_size} znaków" #: lib/pleroma/config/config_db.ex:222 #, elixir-format msgid "Config with params %{params} not found" -msgstr "" +msgstr "Nie znaleziono konfiguracji z parametrami %{params}" #: lib/pleroma/web/common_api/common_api.ex:95 #, elixir-format @@ -213,38 +213,38 @@ msgstr "Nie udało się cofnąć powtórzenia" #: lib/pleroma/web/common_api/common_api.ex:437 #, elixir-format msgid "Could not update state" -msgstr "" +msgstr "Nie można zaktualizować stanu" #: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:202 #, elixir-format msgid "Error." -msgstr "" +msgstr "Błąd." #: lib/pleroma/web/twitter_api/twitter_api.ex:106 #, elixir-format msgid "Invalid CAPTCHA" -msgstr "" +msgstr "Niewłaściwa CAPTCHA" #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:117 #: lib/pleroma/web/oauth/oauth_controller.ex:569 #, elixir-format msgid "Invalid credentials" -msgstr "" +msgstr "Nieprawidłowe dane uwierzytelniania" #: lib/pleroma/plugs/ensure_authenticated_plug.ex:38 #, elixir-format msgid "Invalid credentials." -msgstr "" +msgstr "Nieprawidłowe dane uwierzytelniania." #: lib/pleroma/web/common_api/common_api.ex:265 #, elixir-format msgid "Invalid indices" -msgstr "" +msgstr "Nieprawidłowe indeksy" #: lib/pleroma/web/admin_api/admin_api_controller.ex:1147 #, elixir-format msgid "Invalid parameters" -msgstr "" +msgstr "Nieprawidłowe parametry" #: lib/pleroma/web/common_api/utils.ex:411 #, elixir-format @@ -307,7 +307,7 @@ msgstr "Coś się zepsuło" #: lib/pleroma/web/common_api/activity_draft.ex:107 #, elixir-format msgid "The message visibility must be direct" -msgstr "" +msgstr "Widoczność wiadomości musi być „Bezpośrednia”" #: lib/pleroma/web/common_api/utils.ex:566 #, elixir-format @@ -317,17 +317,17 @@ msgstr "Ten status przekracza limit znaków" #: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31 #, elixir-format msgid "This resource requires authentication." -msgstr "" +msgstr "Ten zasób wymaga uwierzytelnienia." #: lib/pleroma/plugs/rate_limiter/rate_limiter.ex:206 #, elixir-format msgid "Throttled" -msgstr "" +msgstr "Ograniczono" #: lib/pleroma/web/common_api/common_api.ex:266 #, elixir-format msgid "Too many choices" -msgstr "" +msgstr "Zbyt wiele wyborów" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:442 #, elixir-format @@ -349,17 +349,18 @@ msgstr "Twoje konto jest obecnie nieaktywne" #: lib/pleroma/web/oauth/oauth_controller.ex:332 #, elixir-format msgid "Your login is missing a confirmed e-mail address" -msgstr "" +msgstr "Twój adres e-mail nie został potwierdzony" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:389 #, elixir-format msgid "can't read inbox of %{nickname} as %{as_nickname}" -msgstr "" +msgstr "Nie można odczytać skrzynki odbiorczej %{nickname} jako %{as_nickname}" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:472 #, elixir-format msgid "can't update outbox of %{nickname} as %{as_nickname}" msgstr "" +"Nie można zaktualizować skrzynki nadawczcej %{nickname} jako %{as_nickname}" #: lib/pleroma/web/common_api/common_api.ex:388 #, elixir-format @@ -405,12 +406,12 @@ msgstr "Nie udało się" #: lib/pleroma/web/oauth/oauth_controller.ex:411 #, elixir-format msgid "Failed to authenticate: %{message}." -msgstr "" +msgstr "Nie udało się uwierzytelnić: %{message}." #: lib/pleroma/web/oauth/oauth_controller.ex:442 #, elixir-format msgid "Failed to set up user account." -msgstr "" +msgstr "Nie udało się skonfigurować konta użytkownika." #: lib/pleroma/plugs/oauth_scopes_plug.ex:38 #, elixir-format @@ -431,7 +432,7 @@ msgstr "Nieprawidłowa nazwa użytkownika lub hasło" #: lib/pleroma/web/twitter_api/twitter_api.ex:118 #, elixir-format msgid "Invalid answer data" -msgstr "" +msgstr "Nieprawidłowe dane odpowiedzi" #: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:128 #, elixir-format @@ -441,7 +442,7 @@ msgstr "Nieobsługiwana wersja schematu Nodeinfo" #: lib/pleroma/web/oauth/oauth_controller.ex:169 #, elixir-format msgid "This action is outside the authorized scopes" -msgstr "" +msgstr "Ta akcja wykracza poza dozwolone zakresy" #: lib/pleroma/web/oauth/fallback_controller.ex:14 #, elixir-format @@ -477,12 +478,12 @@ msgstr "Błąd CAPTCHA" #: lib/pleroma/web/common_api/common_api.ex:200 #, elixir-format msgid "Could not add reaction emoji" -msgstr "" +msgstr "Nie można dodać reakcji emoji" #: lib/pleroma/web/common_api/common_api.ex:211 #, elixir-format msgid "Could not remove reaction emoji" -msgstr "" +msgstr "Nie można usunąć reakcji emoji" #: lib/pleroma/web/twitter_api/twitter_api.ex:129 #, elixir-format @@ -535,6 +536,8 @@ msgstr "Wymagany reset hasła" #, elixir-format msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped." msgstr "" +"Naruszenie bezpieczeństwa: sprawdzanie zakresów OAuth nie zostało ani " +"wykonane, ani celowo pominięte." #: lib/pleroma/plugs/ensure_authenticated_plug.ex:28 #, elixir-format @@ -569,7 +572,7 @@ msgstr "Nieoczekiwany błąd podczas zmieniania metadanych paczki." #: lib/pleroma/plugs/user_is_admin_plug.ex:21 #, elixir-format msgid "User is not an admin." -msgstr "" +msgstr "Użytkownik nie jest administratorem." #: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61 #, elixir-format diff --git a/priv/repo/migrations/20201005123100_simple_policy_string_to_tuple.exs b/priv/repo/migrations/20201005123100_simple_policy_string_to_tuple.exs new file mode 100644 index 000000000..77a4a7311 --- /dev/null +++ b/priv/repo/migrations/20201005123100_simple_policy_string_to_tuple.exs @@ -0,0 +1,40 @@ +defmodule Pleroma.Repo.Migrations.SimplePolicyStringToTuple do + use Ecto.Migration + + alias Pleroma.ConfigDB + + def up, do: ConfigDB.get_by_params(%{group: :pleroma, key: :mrf_simple}) |> update_to_tuples + def down, do: ConfigDB.get_by_params(%{group: :pleroma, key: :mrf_simple}) |> update_to_strings + + defp update_to_tuples(%{value: value}) do + new_value = + value + |> Enum.map(fn {k, v} -> + {k, + Enum.map(v, fn + {instance, reason} -> {instance, reason} + instance -> {instance, ""} + end)} + end) + + ConfigDB.update_or_create(%{group: :pleroma, key: :mrf_simple, value: new_value}) + end + + defp update_to_tuples(nil), do: {:ok, nil} + + defp update_to_strings(%{value: value}) do + new_value = + value + |> Enum.map(fn {k, v} -> + {k, + Enum.map(v, fn + {instance, _} -> instance + instance -> instance + end)} + end) + + ConfigDB.update_or_create(%{group: :pleroma, key: :mrf_simple, value: new_value}) + end + + defp update_to_strings(nil), do: {:ok, nil} +end diff --git a/priv/repo/migrations/20201005124600_quarantained_policy_string_to_tuple.exs b/priv/repo/migrations/20201005124600_quarantained_policy_string_to_tuple.exs new file mode 100644 index 000000000..b924e4638 --- /dev/null +++ b/priv/repo/migrations/20201005124600_quarantained_policy_string_to_tuple.exs @@ -0,0 +1,61 @@ +defmodule Pleroma.Repo.Migrations.QuarantainedStringToTuple do + use Ecto.Migration + + alias Pleroma.ConfigDB + + def up, + do: + ConfigDB.get_by_params(%{group: :pleroma, key: :instance}) + |> update_quarantined_instances_to_tuples + + def down, + do: + ConfigDB.get_by_params(%{group: :pleroma, key: :instance}) + |> update_quarantined_instances_to_strings + + defp update_quarantined_instances_to_tuples(%{value: settings}) do + settings |> List.keyfind(:quarantined_instances, 0) |> update_to_tuples + end + + defp update_quarantined_instances_to_tuples(nil), do: {:ok, nil} + + defp update_to_tuples({:quarantined_instances, instance_list}) do + new_value = + instance_list + |> Enum.map(fn + {v, r} -> {v, r} + v -> {v, ""} + end) + + ConfigDB.update_or_create(%{ + group: :pleroma, + key: :instance, + value: [quarantined_instances: new_value] + }) + end + + defp update_to_tuples(nil), do: {:ok, nil} + + defp update_quarantined_instances_to_strings(%{value: settings}) do + settings |> List.keyfind(:quarantined_instances, 0) |> update_to_strings + end + + defp update_quarantined_instances_to_strings(nil), do: {:ok, nil} + + defp update_to_strings({:quarantined_instances, instance_list}) do + new_value = + instance_list + |> Enum.map(fn + {v, _} -> v + v -> v + end) + + ConfigDB.update_or_create(%{ + group: :pleroma, + key: :instance, + value: [quarantined_instances: new_value] + }) + end + + defp update_to_strings(nil), do: {:ok, nil} +end diff --git a/priv/repo/migrations/20201005132900_transparency_exclusions_string_to_tuple.exs b/priv/repo/migrations/20201005132900_transparency_exclusions_string_to_tuple.exs new file mode 100644 index 000000000..6516083a7 --- /dev/null +++ b/priv/repo/migrations/20201005132900_transparency_exclusions_string_to_tuple.exs @@ -0,0 +1,61 @@ +defmodule Pleroma.Repo.Migrations.TransparencyExclusionsStringToTuple do + use Ecto.Migration + + alias Pleroma.ConfigDB + + def up, + do: + ConfigDB.get_by_params(%{group: :pleroma, key: :mrf}) + |> update_transparency_exclusions_instances_to_tuples + + def down, + do: + ConfigDB.get_by_params(%{group: :pleroma, key: :mrf}) + |> update_transparency_exclusions_instances_to_strings + + defp update_transparency_exclusions_instances_to_tuples(%{value: settings}) do + settings |> List.keyfind(:transparency_exclusions, 0) |> update_to_tuples + end + + defp update_transparency_exclusions_instances_to_tuples(nil), do: {:ok, nil} + + defp update_to_tuples({:transparency_exclusions, instance_list}) do + new_value = + instance_list + |> Enum.map(fn + {v, r} -> {v, r} + v -> {v, ""} + end) + + ConfigDB.update_or_create(%{ + group: :pleroma, + key: :mrf, + value: [transparency_exclusions: new_value] + }) + end + + defp update_to_tuples(nil), do: {:ok, nil} + + defp update_transparency_exclusions_instances_to_strings(%{value: settings}) do + settings |> List.keyfind(:transparency_exclusions, 0) |> update_to_strings + end + + defp update_transparency_exclusions_instances_to_strings(nil), do: {:ok, nil} + + defp update_to_strings({:transparency_exclusions, instance_list}) do + new_value = + instance_list + |> Enum.map(fn + {v, _} -> v + v -> v + end) + + ConfigDB.update_or_create(%{ + group: :pleroma, + key: :mrf, + value: [transparency_exclusions: new_value] + }) + end + + defp update_to_strings(nil), do: {:ok, nil} +end diff --git a/priv/repo/migrations/20210717000000_add_poll_to_notifications_enum.exs b/priv/repo/migrations/20210717000000_add_poll_to_notifications_enum.exs new file mode 100644 index 000000000..9abf40b3d --- /dev/null +++ b/priv/repo/migrations/20210717000000_add_poll_to_notifications_enum.exs @@ -0,0 +1,49 @@ +defmodule Pleroma.Repo.Migrations.AddPollToNotificationsEnum do + use Ecto.Migration + + @disable_ddl_transaction true + + def up do + """ + alter type notification_type add value 'poll' + """ + |> execute() + end + + def down do + alter table(:notifications) do + modify(:type, :string) + end + + """ + delete from notifications where type = 'poll' + """ + |> execute() + + """ + drop type if exists notification_type + """ + |> execute() + + """ + create type notification_type as enum ( + 'follow', + 'follow_request', + 'mention', + 'move', + 'pleroma:emoji_reaction', + 'pleroma:chat_mention', + 'reblog', + 'favourite', + 'pleroma:report' + ) + """ + |> execute() + + """ + alter table notifications + alter column type type notification_type using (type::notification_type) + """ + |> execute() + end +end diff --git a/priv/static/adminfe/app.143a1409.css b/priv/static/adminfe/app.143a1409.css new file mode 100644 index 000000000..2d2ae4f32 Binary files /dev/null and b/priv/static/adminfe/app.143a1409.css differ diff --git a/priv/static/adminfe/app.6fb984d1.css b/priv/static/adminfe/app.6fb984d1.css deleted file mode 100644 index f1c191c2e..000000000 Binary files a/priv/static/adminfe/app.6fb984d1.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-03c5.3368e00c.css b/priv/static/adminfe/chunk-03c5.9aae1f65.css similarity index 100% rename from priv/static/adminfe/chunk-03c5.3368e00c.css rename to priv/static/adminfe/chunk-03c5.9aae1f65.css diff --git a/priv/static/adminfe/chunk-0537.76929cff.css b/priv/static/adminfe/chunk-0537.76929cff.css deleted file mode 100644 index 5fcb223d8..000000000 Binary files a/priv/static/adminfe/chunk-0537.76929cff.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-0c60.487f66a2.css b/priv/static/adminfe/chunk-0c60.487f66a2.css new file mode 100644 index 000000000..518200932 Binary files /dev/null and b/priv/static/adminfe/chunk-0c60.487f66a2.css differ diff --git a/priv/static/adminfe/chunk-170f.fea927c5.css b/priv/static/adminfe/chunk-1719.17e585a5.css similarity index 100% rename from priv/static/adminfe/chunk-170f.fea927c5.css rename to priv/static/adminfe/chunk-1719.17e585a5.css diff --git a/priv/static/adminfe/chunk-176e.d9a630b2.css b/priv/static/adminfe/chunk-176e.fd32d133.css similarity index 100% rename from priv/static/adminfe/chunk-176e.d9a630b2.css rename to priv/static/adminfe/chunk-176e.fd32d133.css diff --git a/priv/static/adminfe/chunk-1e1e.5980e665.css b/priv/static/adminfe/chunk-1e1e.5980e665.css deleted file mode 100644 index 1b3a9fcab..000000000 Binary files a/priv/static/adminfe/chunk-1e1e.5980e665.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-7c6b.b633878a.css b/priv/static/adminfe/chunk-2658.8ab9ac8a.css similarity index 73% rename from priv/static/adminfe/chunk-7c6b.b633878a.css rename to priv/static/adminfe/chunk-2658.8ab9ac8a.css index 9d730019a..51c63c112 100644 Binary files a/priv/static/adminfe/chunk-7c6b.b633878a.css and b/priv/static/adminfe/chunk-2658.8ab9ac8a.css differ diff --git a/priv/static/adminfe/chunk-606c.7c5b0a08.css b/priv/static/adminfe/chunk-2de0.0a7ddf1e.css similarity index 100% rename from priv/static/adminfe/chunk-606c.7c5b0a08.css rename to priv/static/adminfe/chunk-2de0.0a7ddf1e.css diff --git a/priv/static/adminfe/chunk-7968.613084d0.css b/priv/static/adminfe/chunk-4403.bac94db6.css similarity index 100% rename from priv/static/adminfe/chunk-7968.613084d0.css rename to priv/static/adminfe/chunk-4403.bac94db6.css diff --git a/priv/static/adminfe/chunk-45ed.3bf8b200.css b/priv/static/adminfe/chunk-45ed.3bf8b200.css new file mode 100644 index 000000000..2393a696a Binary files /dev/null and b/priv/static/adminfe/chunk-45ed.3bf8b200.css differ diff --git a/priv/static/adminfe/chunk-4770.20caaae1.css b/priv/static/adminfe/chunk-4770.20caaae1.css deleted file mode 100644 index 6f2331666..000000000 Binary files a/priv/static/adminfe/chunk-4770.20caaae1.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-4a1e.4b10c06f.css b/priv/static/adminfe/chunk-4a1e.4b10c06f.css new file mode 100644 index 000000000..3ed514994 Binary files /dev/null and b/priv/static/adminfe/chunk-4a1e.4b10c06f.css differ diff --git a/priv/static/adminfe/chunk-35b1.949db050.css b/priv/static/adminfe/chunk-4d80.3e815d08.css similarity index 100% rename from priv/static/adminfe/chunk-35b1.949db050.css rename to priv/static/adminfe/chunk-4d80.3e815d08.css diff --git a/priv/static/adminfe/chunk-e660.62c077ac.css b/priv/static/adminfe/chunk-5243.9b37b395.css similarity index 62% rename from priv/static/adminfe/chunk-e660.62c077ac.css rename to priv/static/adminfe/chunk-5243.9b37b395.css index c0074e6f7..faf49a8ad 100644 Binary files a/priv/static/adminfe/chunk-e660.62c077ac.css and b/priv/static/adminfe/chunk-5243.9b37b395.css differ diff --git a/priv/static/adminfe/chunk-5ff8.4ccacc86.css b/priv/static/adminfe/chunk-5ff8.4ccacc86.css new file mode 100644 index 000000000..be4b76764 Binary files /dev/null and b/priv/static/adminfe/chunk-5ff8.4ccacc86.css differ diff --git a/priv/static/adminfe/chunk-68ea9.892994aa.css b/priv/static/adminfe/chunk-68ea9.892994aa.css deleted file mode 100644 index 30bf7de23..000000000 Binary files a/priv/static/adminfe/chunk-68ea9.892994aa.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-6e81.687d5046.css b/priv/static/adminfe/chunk-6e81.687d5046.css deleted file mode 100644 index da819ca09..000000000 Binary files a/priv/static/adminfe/chunk-6e81.687d5046.css and /dev/null differ diff --git a/priv/static/adminfe/chunk-71b5.a479f25b.css b/priv/static/adminfe/chunk-71b5.a479f25b.css new file mode 100644 index 000000000..01089f6e6 Binary files /dev/null and b/priv/static/adminfe/chunk-71b5.a479f25b.css differ diff --git a/priv/static/adminfe/chunk-f364.4fd16c53.css b/priv/static/adminfe/chunk-a104.e69888e1.css similarity index 100% rename from priv/static/adminfe/chunk-f364.4fd16c53.css rename to priv/static/adminfe/chunk-a104.e69888e1.css diff --git a/priv/static/adminfe/chunk-bc60.4417dd06.css b/priv/static/adminfe/chunk-bc60.adb8a162.css similarity index 100% rename from priv/static/adminfe/chunk-bc60.4417dd06.css rename to priv/static/adminfe/chunk-bc60.adb8a162.css diff --git a/priv/static/adminfe/chunk-commons.f7c3d390.css b/priv/static/adminfe/chunk-commons.c9de7e30.css similarity index 100% rename from priv/static/adminfe/chunk-commons.f7c3d390.css rename to priv/static/adminfe/chunk-commons.c9de7e30.css diff --git a/priv/static/adminfe/chunk-elementUI.f77689d7.css b/priv/static/adminfe/chunk-elementUI.f1f2be85.css similarity index 100% rename from priv/static/adminfe/chunk-elementUI.f77689d7.css rename to priv/static/adminfe/chunk-elementUI.f1f2be85.css diff --git a/priv/static/adminfe/chunk-7041.c5f6eab7.css b/priv/static/adminfe/chunk-f1f7.c3b9c13f.css similarity index 100% rename from priv/static/adminfe/chunk-7041.c5f6eab7.css rename to priv/static/adminfe/chunk-f1f7.c3b9c13f.css diff --git a/priv/static/adminfe/chunk-libs.5cf7f50a.css b/priv/static/adminfe/chunk-libs.74976a6a.css similarity index 100% rename from priv/static/adminfe/chunk-libs.5cf7f50a.css rename to priv/static/adminfe/chunk-libs.74976a6a.css diff --git a/priv/static/adminfe/index.html b/priv/static/adminfe/index.html index 09915e8cd..dd3e78ba9 100644 --- a/priv/static/adminfe/index.html +++ b/priv/static/adminfe/index.html @@ -1 +1 @@ -Admin FE
\ No newline at end of file +Admin FE
\ No newline at end of file diff --git a/priv/static/adminfe/static/img/401.089007e.gif b/priv/static/adminfe/static/img/401.089007e.gif deleted file mode 100644 index cd6e0d943..000000000 Binary files a/priv/static/adminfe/static/img/401.089007e.gif and /dev/null differ diff --git a/priv/static/adminfe/static/img/404.a57b6f3.png b/priv/static/adminfe/static/img/404.a57b6f3.png deleted file mode 100644 index 3d8e2305c..000000000 Binary files a/priv/static/adminfe/static/img/404.a57b6f3.png and /dev/null differ diff --git a/priv/static/adminfe/static/js/app.1428845f.js b/priv/static/adminfe/static/js/app.1428845f.js deleted file mode 100644 index cc9541168..000000000 Binary files a/priv/static/adminfe/static/js/app.1428845f.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/app.1428845f.js.map b/priv/static/adminfe/static/js/app.1428845f.js.map deleted file mode 100644 index 3fba88015..000000000 Binary files a/priv/static/adminfe/static/js/app.1428845f.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/app.f02f5ebc.js b/priv/static/adminfe/static/js/app.f02f5ebc.js new file mode 100644 index 000000000..5dfda1355 Binary files /dev/null and b/priv/static/adminfe/static/js/app.f02f5ebc.js differ diff --git a/priv/static/adminfe/static/js/app.f02f5ebc.js.map b/priv/static/adminfe/static/js/app.f02f5ebc.js.map new file mode 100644 index 000000000..d9150b9c7 Binary files /dev/null and b/priv/static/adminfe/static/js/app.f02f5ebc.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js b/priv/static/adminfe/static/js/chunk-03c5.7f893db6.js similarity index 99% rename from priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js rename to priv/static/adminfe/static/js/chunk-03c5.7f893db6.js index 94dfce1a8..39c811b0a 100644 Binary files a/priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js and b/priv/static/adminfe/static/js/chunk-03c5.7f893db6.js differ diff --git a/priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js.map b/priv/static/adminfe/static/js/chunk-03c5.7f893db6.js.map similarity index 99% rename from priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js.map rename to priv/static/adminfe/static/js/chunk-03c5.7f893db6.js.map index acf1ba219..a6bd8c2a4 100644 Binary files a/priv/static/adminfe/static/js/chunk-03c5.1b0ab243.js.map and b/priv/static/adminfe/static/js/chunk-03c5.7f893db6.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-0537.d0eef370.js b/priv/static/adminfe/static/js/chunk-0537.d0eef370.js deleted file mode 100644 index f1b73a18a..000000000 Binary files a/priv/static/adminfe/static/js/chunk-0537.d0eef370.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-0537.d0eef370.js.map b/priv/static/adminfe/static/js/chunk-0537.d0eef370.js.map deleted file mode 100644 index e0a2f4d21..000000000 Binary files a/priv/static/adminfe/static/js/chunk-0537.d0eef370.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js b/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js new file mode 100644 index 000000000..32e6d9d7f Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js differ diff --git a/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js.map b/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js.map new file mode 100644 index 000000000..cc4f8245f Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-0c60.9b12ac3f.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js b/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js deleted file mode 100644 index d40dc29bd..000000000 Binary files a/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js.map b/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js.map deleted file mode 100644 index 91d3bc70d..000000000 Binary files a/priv/static/adminfe/static/js/chunk-170f.e1d6aac3.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js b/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js new file mode 100644 index 000000000..8e0b8fc0c Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js differ diff --git a/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js.map b/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js.map new file mode 100644 index 000000000..ba686cddc Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-1719.d152ff7e.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-176e.f64cb745.js b/priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js similarity index 62% rename from priv/static/adminfe/static/js/chunk-176e.f64cb745.js rename to priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js index dd60693da..96498620f 100644 Binary files a/priv/static/adminfe/static/js/chunk-176e.f64cb745.js and b/priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js differ diff --git a/priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js.map b/priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js.map new file mode 100644 index 000000000..c3a4d48cf Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-176e.c2ac32bc.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-176e.f64cb745.js.map b/priv/static/adminfe/static/js/chunk-176e.f64cb745.js.map deleted file mode 100644 index 9ee6aa6e4..000000000 Binary files a/priv/static/adminfe/static/js/chunk-176e.f64cb745.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js b/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js deleted file mode 100644 index 65d0aa926..000000000 Binary files a/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js.map b/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js.map deleted file mode 100644 index a0b5ca3be..000000000 Binary files a/priv/static/adminfe/static/js/chunk-1e1e.37f6f555.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-2658.832c58e6.js b/priv/static/adminfe/static/js/chunk-2658.832c58e6.js new file mode 100644 index 000000000..7d18494df Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-2658.832c58e6.js differ diff --git a/priv/static/adminfe/static/js/chunk-2658.832c58e6.js.map b/priv/static/adminfe/static/js/chunk-2658.832c58e6.js.map new file mode 100644 index 000000000..af2645772 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-2658.832c58e6.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-606c.8ac52179.js b/priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js similarity index 99% rename from priv/static/adminfe/static/js/chunk-606c.8ac52179.js rename to priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js index 7ae3ce7b1..dea6a3d19 100644 Binary files a/priv/static/adminfe/static/js/chunk-606c.8ac52179.js and b/priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js differ diff --git a/priv/static/adminfe/static/js/chunk-606c.8ac52179.js.map b/priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js.map similarity index 99% rename from priv/static/adminfe/static/js/chunk-606c.8ac52179.js.map rename to priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js.map index 8c41c2755..f8f9cb6ed 100644 Binary files a/priv/static/adminfe/static/js/chunk-606c.8ac52179.js.map and b/priv/static/adminfe/static/js/chunk-2de0.06ba9e2f.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js b/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js deleted file mode 100644 index 75a2bf0c2..000000000 Binary files a/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js.map b/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js.map deleted file mode 100644 index b5e2a27b2..000000000 Binary files a/priv/static/adminfe/static/js/chunk-35b1.50c1449b.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js b/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js new file mode 100644 index 000000000..aecd1db9d Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js differ diff --git a/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js.map b/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js.map new file mode 100644 index 000000000..9c187fdd8 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4403.528e3dd7.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js b/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js new file mode 100644 index 000000000..c78d4ddb8 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js differ diff --git a/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js.map b/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js.map new file mode 100644 index 000000000..9b563e578 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-45ed.a89b5b8d.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js b/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js deleted file mode 100644 index 706ede69e..000000000 Binary files a/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js.map b/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js.map deleted file mode 100644 index f1303900d..000000000 Binary files a/priv/static/adminfe/static/js/chunk-4770.1c1fff97.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js b/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js new file mode 100644 index 000000000..17fff7036 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js differ diff --git a/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js.map b/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js.map new file mode 100644 index 000000000..01b9eb2dc Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4a1e.0f4047c1.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js b/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js new file mode 100644 index 000000000..70c894558 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js differ diff --git a/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js.map b/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js.map new file mode 100644 index 000000000..8de714f2b Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-4d80.6911cb76.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js b/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js new file mode 100644 index 000000000..4f5b13f6f Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js differ diff --git a/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js.map b/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js.map new file mode 100644 index 000000000..846e97f4c Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-5243.aa83b96d.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js b/priv/static/adminfe/static/js/chunk-5497.34fbd46e.js similarity index 98% rename from priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js rename to priv/static/adminfe/static/js/chunk-5497.34fbd46e.js index 4e7ab35bb..e28d9587b 100644 Binary files a/priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js and b/priv/static/adminfe/static/js/chunk-5497.34fbd46e.js differ diff --git a/priv/static/adminfe/static/js/chunk-5497.34fbd46e.js.map b/priv/static/adminfe/static/js/chunk-5497.34fbd46e.js.map new file mode 100644 index 000000000..459246aec Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-5497.34fbd46e.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js b/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js new file mode 100644 index 000000000..86f558de4 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js differ diff --git a/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js.map b/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js.map new file mode 100644 index 000000000..02804f0c6 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-5ff8.a7482f14.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js b/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js deleted file mode 100644 index b11c19485..000000000 Binary files a/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js.map b/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js.map deleted file mode 100644 index 8779a5e95..000000000 Binary files a/priv/static/adminfe/static/js/chunk-68ea9.5a11341a.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js b/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js deleted file mode 100644 index 6fd67c44f..000000000 Binary files a/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js.map b/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js.map deleted file mode 100644 index 931f7521e..000000000 Binary files a/priv/static/adminfe/static/js/chunk-6e81.6c4f2ce1.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js b/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js deleted file mode 100644 index 50eb1a5f5..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js.map b/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js.map deleted file mode 100644 index 401bb0b1f..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7041.390b2ec4.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js b/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js new file mode 100644 index 000000000..ae6e3d3b0 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js differ diff --git a/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js.map b/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js.map new file mode 100644 index 000000000..c9ab30c0a Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-71b5.a60307b1.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-7968.88218960.js b/priv/static/adminfe/static/js/chunk-7968.88218960.js deleted file mode 100644 index 44348d9d1..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7968.88218960.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-7968.88218960.js.map b/priv/static/adminfe/static/js/chunk-7968.88218960.js.map deleted file mode 100644 index 6fa0131fc..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7968.88218960.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-7c6b.34152862.js b/priv/static/adminfe/static/js/chunk-7c6b.34152862.js deleted file mode 100644 index 27d57d3ff..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7c6b.34152862.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-7c6b.34152862.js.map b/priv/static/adminfe/static/js/chunk-7c6b.34152862.js.map deleted file mode 100644 index 78026f5f4..000000000 Binary files a/priv/static/adminfe/static/js/chunk-7c6b.34152862.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-a104.07359dcd.js b/priv/static/adminfe/static/js/chunk-a104.07359dcd.js new file mode 100644 index 000000000..f6c3c46b7 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-a104.07359dcd.js differ diff --git a/priv/static/adminfe/static/js/chunk-a104.07359dcd.js.map b/priv/static/adminfe/static/js/chunk-a104.07359dcd.js.map new file mode 100644 index 000000000..cc9b00b22 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-a104.07359dcd.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js b/priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js similarity index 99% rename from priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js rename to priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js index b2206aa11..ca1823d44 100644 Binary files a/priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js and b/priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js differ diff --git a/priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js.map b/priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js.map similarity index 99% rename from priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js.map rename to priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js.map index 799352270..10ea33531 100644 Binary files a/priv/static/adminfe/static/js/chunk-bc60.79f8c7e7.js.map and b/priv/static/adminfe/static/js/chunk-bc60.4dbf525d.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-commons.4ae74caa.js b/priv/static/adminfe/static/js/chunk-commons.7f561ac1.js similarity index 99% rename from priv/static/adminfe/static/js/chunk-commons.4ae74caa.js rename to priv/static/adminfe/static/js/chunk-commons.7f561ac1.js index 1ee2ea9e4..5c38ba894 100644 Binary files a/priv/static/adminfe/static/js/chunk-commons.4ae74caa.js and b/priv/static/adminfe/static/js/chunk-commons.7f561ac1.js differ diff --git a/priv/static/adminfe/static/js/chunk-commons.4ae74caa.js.map b/priv/static/adminfe/static/js/chunk-commons.7f561ac1.js.map similarity index 99% rename from priv/static/adminfe/static/js/chunk-commons.4ae74caa.js.map rename to priv/static/adminfe/static/js/chunk-commons.7f561ac1.js.map index 41a884d15..a543f2c43 100644 Binary files a/priv/static/adminfe/static/js/chunk-commons.4ae74caa.js.map and b/priv/static/adminfe/static/js/chunk-commons.7f561ac1.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js.map b/priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js.map deleted file mode 100644 index 323d9ba2a..000000000 Binary files a/priv/static/adminfe/static/js/chunk-d55e.f9bab96d.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-e660.2101cafc.js b/priv/static/adminfe/static/js/chunk-e660.2101cafc.js deleted file mode 100644 index 20ecbb5a4..000000000 Binary files a/priv/static/adminfe/static/js/chunk-e660.2101cafc.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-e660.2101cafc.js.map b/priv/static/adminfe/static/js/chunk-e660.2101cafc.js.map deleted file mode 100644 index 2ff5149ad..000000000 Binary files a/priv/static/adminfe/static/js/chunk-e660.2101cafc.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js b/priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js similarity index 99% rename from priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js rename to priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js index 65462dc89..0696ae2b3 100644 Binary files a/priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js and b/priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js differ diff --git a/priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js.map b/priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js.map similarity index 99% rename from priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js.map rename to priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js.map index 3381fd56a..04b4df906 100644 Binary files a/priv/static/adminfe/static/js/chunk-elementUI.21957ec8.js.map and b/priv/static/adminfe/static/js/chunk-elementUI.4c32a355.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js b/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js new file mode 100644 index 000000000..20015ca8f Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js differ diff --git a/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js.map b/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js.map new file mode 100644 index 000000000..751f252ea Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-f1f7.80ae76f2.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-f364.a5927f18.js b/priv/static/adminfe/static/js/chunk-f364.a5927f18.js deleted file mode 100644 index 9a872d819..000000000 Binary files a/priv/static/adminfe/static/js/chunk-f364.a5927f18.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-f364.a5927f18.js.map b/priv/static/adminfe/static/js/chunk-f364.a5927f18.js.map deleted file mode 100644 index 05f67d1a5..000000000 Binary files a/priv/static/adminfe/static/js/chunk-f364.a5927f18.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js b/priv/static/adminfe/static/js/chunk-libs.55b24a78.js similarity index 77% rename from priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js rename to priv/static/adminfe/static/js/chunk-libs.55b24a78.js index a496b679c..f7b952a20 100644 Binary files a/priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js and b/priv/static/adminfe/static/js/chunk-libs.55b24a78.js differ diff --git a/priv/static/adminfe/static/js/chunk-libs.55b24a78.js.map b/priv/static/adminfe/static/js/chunk-libs.55b24a78.js.map new file mode 100644 index 000000000..b2023c1f3 Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-libs.55b24a78.js.map differ diff --git a/priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js.map b/priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js.map deleted file mode 100644 index 3b2db293f..000000000 Binary files a/priv/static/adminfe/static/js/chunk-libs.5ca2c8e8.js.map and /dev/null differ diff --git a/priv/static/adminfe/static/js/runtime.2a586239.js b/priv/static/adminfe/static/js/runtime.2a586239.js new file mode 100644 index 000000000..43cd69012 Binary files /dev/null and b/priv/static/adminfe/static/js/runtime.2a586239.js differ diff --git a/priv/static/adminfe/static/js/runtime.2a586239.js.map b/priv/static/adminfe/static/js/runtime.2a586239.js.map new file mode 100644 index 000000000..9ff192bfd Binary files /dev/null and b/priv/static/adminfe/static/js/runtime.2a586239.js.map differ diff --git a/priv/static/adminfe/static/js/runtime.6b30c658.js b/priv/static/adminfe/static/js/runtime.6b30c658.js deleted file mode 100644 index ecdf93f1b..000000000 Binary files a/priv/static/adminfe/static/js/runtime.6b30c658.js and /dev/null differ diff --git a/priv/static/adminfe/static/js/runtime.6b30c658.js.map b/priv/static/adminfe/static/js/runtime.6b30c658.js.map deleted file mode 100644 index 67a46d4bf..000000000 Binary files a/priv/static/adminfe/static/js/runtime.6b30c658.js.map and /dev/null differ diff --git a/priv/static/index.html b/priv/static/index.html index 88bf1484d..9ef3ad6e4 100644 --- a/priv/static/index.html +++ b/priv/static/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/priv/static/static/config.json b/priv/static/static/config.json index f59e645ac..53a4be823 100644 --- a/priv/static/static/config.json +++ b/priv/static/static/config.json @@ -2,7 +2,6 @@ "alwaysShowSubjectInput": true, "background": "/static/aurora_borealis.jpg", "collapseMessageWithSubject": false, - "disableChat": false, "greentext": false, "hideFilteredStatuses": false, "hideMutedPosts": false, diff --git a/priv/static/static/js/10.9a138b362edd4833778a.js b/priv/static/static/js/10.9a138b362edd4833778a.js deleted file mode 100644 index 0518eec26..000000000 Binary files a/priv/static/static/js/10.9a138b362edd4833778a.js and /dev/null differ diff --git a/priv/static/static/js/10.fdbf093cc5602ca4f2e1.js b/priv/static/static/js/10.fdbf093cc5602ca4f2e1.js new file mode 100644 index 000000000..966332053 Binary files /dev/null and b/priv/static/static/js/10.fdbf093cc5602ca4f2e1.js differ diff --git a/priv/static/static/js/10.9a138b362edd4833778a.js.map b/priv/static/static/js/10.fdbf093cc5602ca4f2e1.js.map similarity index 56% rename from priv/static/static/js/10.9a138b362edd4833778a.js.map rename to priv/static/static/js/10.fdbf093cc5602ca4f2e1.js.map index 6a0c72332..978f9e54d 100644 Binary files a/priv/static/static/js/10.9a138b362edd4833778a.js.map and b/priv/static/static/js/10.fdbf093cc5602ca4f2e1.js.map differ diff --git a/priv/static/static/js/11.7b11fd75fe61d6e10ac6.js b/priv/static/static/js/11.7b11fd75fe61d6e10ac6.js new file mode 100644 index 000000000..2e39538d0 Binary files /dev/null and b/priv/static/static/js/11.7b11fd75fe61d6e10ac6.js differ diff --git a/priv/static/static/js/11.9d88e9e710c4e0d0c897.js.map b/priv/static/static/js/11.7b11fd75fe61d6e10ac6.js.map similarity index 56% rename from priv/static/static/js/11.9d88e9e710c4e0d0c897.js.map rename to priv/static/static/js/11.7b11fd75fe61d6e10ac6.js.map index ae6a2b9c4..f5b9efef8 100644 Binary files a/priv/static/static/js/11.9d88e9e710c4e0d0c897.js.map and b/priv/static/static/js/11.7b11fd75fe61d6e10ac6.js.map differ diff --git a/priv/static/static/js/11.9d88e9e710c4e0d0c897.js b/priv/static/static/js/11.9d88e9e710c4e0d0c897.js deleted file mode 100644 index cbfd37408..000000000 Binary files a/priv/static/static/js/11.9d88e9e710c4e0d0c897.js and /dev/null differ diff --git a/priv/static/static/js/12.36ee26c30e2909c8be60.js b/priv/static/static/js/12.36ee26c30e2909c8be60.js deleted file mode 100644 index 418717dfc..000000000 Binary files a/priv/static/static/js/12.36ee26c30e2909c8be60.js and /dev/null differ diff --git a/priv/static/static/js/12.a3dc3473565ec07a88c2.js b/priv/static/static/js/12.a3dc3473565ec07a88c2.js new file mode 100644 index 000000000..ad6414e72 Binary files /dev/null and b/priv/static/static/js/12.a3dc3473565ec07a88c2.js differ diff --git a/priv/static/static/js/12.36ee26c30e2909c8be60.js.map b/priv/static/static/js/12.a3dc3473565ec07a88c2.js.map similarity index 56% rename from priv/static/static/js/12.36ee26c30e2909c8be60.js.map rename to priv/static/static/js/12.a3dc3473565ec07a88c2.js.map index 1f9de123e..7b8fe89ac 100644 Binary files a/priv/static/static/js/12.36ee26c30e2909c8be60.js.map and b/priv/static/static/js/12.a3dc3473565ec07a88c2.js.map differ diff --git a/priv/static/static/js/13.cdc076533397e24391bc.js b/priv/static/static/js/13.cdc076533397e24391bc.js new file mode 100644 index 000000000..6819297a8 Binary files /dev/null and b/priv/static/static/js/13.cdc076533397e24391bc.js differ diff --git a/priv/static/static/js/13.d02023d426b44a6886af.js.map b/priv/static/static/js/13.cdc076533397e24391bc.js.map similarity index 56% rename from priv/static/static/js/13.d02023d426b44a6886af.js.map rename to priv/static/static/js/13.cdc076533397e24391bc.js.map index a202df0d2..19b1f31f8 100644 Binary files a/priv/static/static/js/13.d02023d426b44a6886af.js.map and b/priv/static/static/js/13.cdc076533397e24391bc.js.map differ diff --git a/priv/static/static/js/13.d02023d426b44a6886af.js b/priv/static/static/js/13.d02023d426b44a6886af.js deleted file mode 100644 index 13f1abcb0..000000000 Binary files a/priv/static/static/js/13.d02023d426b44a6886af.js and /dev/null differ diff --git a/priv/static/static/js/14.8e7c0873d041b34efd84.js b/priv/static/static/js/14.8e7c0873d041b34efd84.js deleted file mode 100644 index 74432f43d..000000000 Binary files a/priv/static/static/js/14.8e7c0873d041b34efd84.js and /dev/null differ diff --git a/priv/static/static/js/14.8e7c0873d041b34efd84.js.map b/priv/static/static/js/14.8e7c0873d041b34efd84.js.map deleted file mode 100644 index e73fcfe38..000000000 Binary files a/priv/static/static/js/14.8e7c0873d041b34efd84.js.map and /dev/null differ diff --git a/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js b/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js new file mode 100644 index 000000000..9111373a2 Binary files /dev/null and b/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js differ diff --git a/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js.map b/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js.map new file mode 100644 index 000000000..c1a2c983f Binary files /dev/null and b/priv/static/static/js/14.a2b9acaf9caa95d1fd7f.js.map differ diff --git a/priv/static/static/js/15.349c342e2fe7e9e0fe01.js b/priv/static/static/js/15.349c342e2fe7e9e0fe01.js deleted file mode 100644 index f77855cfc..000000000 Binary files a/priv/static/static/js/15.349c342e2fe7e9e0fe01.js and /dev/null differ diff --git a/priv/static/static/js/15.349c342e2fe7e9e0fe01.js.map b/priv/static/static/js/15.349c342e2fe7e9e0fe01.js.map deleted file mode 100644 index d9394d405..000000000 Binary files a/priv/static/static/js/15.349c342e2fe7e9e0fe01.js.map and /dev/null differ diff --git a/priv/static/static/js/15.fe4e76f27cc478289a42.js b/priv/static/static/js/15.fe4e76f27cc478289a42.js new file mode 100644 index 000000000..3005c67b3 Binary files /dev/null and b/priv/static/static/js/15.fe4e76f27cc478289a42.js differ diff --git a/priv/static/static/js/15.fe4e76f27cc478289a42.js.map b/priv/static/static/js/15.fe4e76f27cc478289a42.js.map new file mode 100644 index 000000000..7177387b7 Binary files /dev/null and b/priv/static/static/js/15.fe4e76f27cc478289a42.js.map differ diff --git a/priv/static/static/js/16.90b5ee380da41d6d061c.js b/priv/static/static/js/16.90b5ee380da41d6d061c.js new file mode 100644 index 000000000..f3a4fadd4 Binary files /dev/null and b/priv/static/static/js/16.90b5ee380da41d6d061c.js differ diff --git a/priv/static/static/js/16.90b5ee380da41d6d061c.js.map b/priv/static/static/js/16.90b5ee380da41d6d061c.js.map new file mode 100644 index 000000000..f69273c5c Binary files /dev/null and b/priv/static/static/js/16.90b5ee380da41d6d061c.js.map differ diff --git a/priv/static/static/js/16.cf210505237c2a0040dd.js b/priv/static/static/js/16.cf210505237c2a0040dd.js deleted file mode 100644 index 4341c4e6e..000000000 Binary files a/priv/static/static/js/16.cf210505237c2a0040dd.js and /dev/null differ diff --git a/priv/static/static/js/16.cf210505237c2a0040dd.js.map b/priv/static/static/js/16.cf210505237c2a0040dd.js.map deleted file mode 100644 index e6c3a7b56..000000000 Binary files a/priv/static/static/js/16.cf210505237c2a0040dd.js.map and /dev/null differ diff --git a/priv/static/static/js/17.c5a6513076aa9c5a9564.js b/priv/static/static/js/17.c5a6513076aa9c5a9564.js new file mode 100644 index 000000000..74c623294 Binary files /dev/null and b/priv/static/static/js/17.c5a6513076aa9c5a9564.js differ diff --git a/priv/static/static/js/17.c5a6513076aa9c5a9564.js.map b/priv/static/static/js/17.c5a6513076aa9c5a9564.js.map new file mode 100644 index 000000000..f2ac5ef45 Binary files /dev/null and b/priv/static/static/js/17.c5a6513076aa9c5a9564.js.map differ diff --git a/priv/static/static/js/17.fe52ece512025177a3b8.js b/priv/static/static/js/17.fe52ece512025177a3b8.js deleted file mode 100644 index 25d7ed77c..000000000 Binary files a/priv/static/static/js/17.fe52ece512025177a3b8.js and /dev/null differ diff --git a/priv/static/static/js/17.fe52ece512025177a3b8.js.map b/priv/static/static/js/17.fe52ece512025177a3b8.js.map deleted file mode 100644 index cfdd5717d..000000000 Binary files a/priv/static/static/js/17.fe52ece512025177a3b8.js.map and /dev/null differ diff --git a/priv/static/static/js/18.c0d447ff77030482a94c.js b/priv/static/static/js/18.c0d447ff77030482a94c.js deleted file mode 100644 index 4bb119120..000000000 Binary files a/priv/static/static/js/18.c0d447ff77030482a94c.js and /dev/null differ diff --git a/priv/static/static/js/18.c0d447ff77030482a94c.js.map b/priv/static/static/js/18.c0d447ff77030482a94c.js.map deleted file mode 100644 index d2ff3aa95..000000000 Binary files a/priv/static/static/js/18.c0d447ff77030482a94c.js.map and /dev/null differ diff --git a/priv/static/static/js/18.ffde79cfe78615dbb020.js b/priv/static/static/js/18.ffde79cfe78615dbb020.js new file mode 100644 index 000000000..7dab8a63d Binary files /dev/null and b/priv/static/static/js/18.ffde79cfe78615dbb020.js differ diff --git a/priv/static/static/js/18.ffde79cfe78615dbb020.js.map b/priv/static/static/js/18.ffde79cfe78615dbb020.js.map new file mode 100644 index 000000000..21c9fcc95 Binary files /dev/null and b/priv/static/static/js/18.ffde79cfe78615dbb020.js.map differ diff --git a/priv/static/static/js/19.9b0c21b72dedc1b244bd.js b/priv/static/static/js/19.9b0c21b72dedc1b244bd.js deleted file mode 100644 index 0c8605d10..000000000 Binary files a/priv/static/static/js/19.9b0c21b72dedc1b244bd.js and /dev/null differ diff --git a/priv/static/static/js/19.9b0c21b72dedc1b244bd.js.map b/priv/static/static/js/19.9b0c21b72dedc1b244bd.js.map deleted file mode 100644 index 8f3305b3a..000000000 Binary files a/priv/static/static/js/19.9b0c21b72dedc1b244bd.js.map and /dev/null differ diff --git a/priv/static/static/js/19.c031807287d659bd841d.js b/priv/static/static/js/19.c031807287d659bd841d.js new file mode 100644 index 000000000..8664e0814 Binary files /dev/null and b/priv/static/static/js/19.c031807287d659bd841d.js differ diff --git a/priv/static/static/js/19.c031807287d659bd841d.js.map b/priv/static/static/js/19.c031807287d659bd841d.js.map new file mode 100644 index 000000000..4a5527aae Binary files /dev/null and b/priv/static/static/js/19.c031807287d659bd841d.js.map differ diff --git a/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js b/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js new file mode 100644 index 000000000..31ef2f0ac Binary files /dev/null and b/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js differ diff --git a/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js.map b/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js.map new file mode 100644 index 000000000..06d872608 Binary files /dev/null and b/priv/static/static/js/2.5f3ceb7bdf08fadacf00.js.map differ diff --git a/priv/static/static/js/2.80ae75b951121aacd208.js b/priv/static/static/js/2.80ae75b951121aacd208.js deleted file mode 100644 index e2e37bf88..000000000 Binary files a/priv/static/static/js/2.80ae75b951121aacd208.js and /dev/null differ diff --git a/priv/static/static/js/2.80ae75b951121aacd208.js.map b/priv/static/static/js/2.80ae75b951121aacd208.js.map deleted file mode 100644 index 5528b7116..000000000 Binary files a/priv/static/static/js/2.80ae75b951121aacd208.js.map and /dev/null differ diff --git a/priv/static/static/js/20.abb0d332055536a87c38.js b/priv/static/static/js/20.abb0d332055536a87c38.js new file mode 100644 index 000000000..2d92fdfbd Binary files /dev/null and b/priv/static/static/js/20.abb0d332055536a87c38.js differ diff --git a/priv/static/static/js/20.abb0d332055536a87c38.js.map b/priv/static/static/js/20.abb0d332055536a87c38.js.map new file mode 100644 index 000000000..55c20779e Binary files /dev/null and b/priv/static/static/js/20.abb0d332055536a87c38.js.map differ diff --git a/priv/static/static/js/20.fee3cd69d629f271e653.js b/priv/static/static/js/20.fee3cd69d629f271e653.js deleted file mode 100644 index 8dc617e25..000000000 Binary files a/priv/static/static/js/20.fee3cd69d629f271e653.js and /dev/null differ diff --git a/priv/static/static/js/20.fee3cd69d629f271e653.js.map b/priv/static/static/js/20.fee3cd69d629f271e653.js.map deleted file mode 100644 index b80afa931..000000000 Binary files a/priv/static/static/js/20.fee3cd69d629f271e653.js.map and /dev/null differ diff --git a/priv/static/static/js/21.6e952388ef8d5a0276dc.js b/priv/static/static/js/21.6e952388ef8d5a0276dc.js new file mode 100644 index 000000000..27ab1f65e Binary files /dev/null and b/priv/static/static/js/21.6e952388ef8d5a0276dc.js differ diff --git a/priv/static/static/js/21.6e952388ef8d5a0276dc.js.map b/priv/static/static/js/21.6e952388ef8d5a0276dc.js.map new file mode 100644 index 000000000..22d29b80c Binary files /dev/null and b/priv/static/static/js/21.6e952388ef8d5a0276dc.js.map differ diff --git a/priv/static/static/js/21.9b5434a9d2b0b07a3038.js b/priv/static/static/js/21.9b5434a9d2b0b07a3038.js deleted file mode 100644 index e01b51a44..000000000 Binary files a/priv/static/static/js/21.9b5434a9d2b0b07a3038.js and /dev/null differ diff --git a/priv/static/static/js/21.9b5434a9d2b0b07a3038.js.map b/priv/static/static/js/21.9b5434a9d2b0b07a3038.js.map deleted file mode 100644 index cb2792ac9..000000000 Binary files a/priv/static/static/js/21.9b5434a9d2b0b07a3038.js.map and /dev/null differ diff --git a/priv/static/static/js/22.132b7fba6bee9817b39f.js b/priv/static/static/js/22.132b7fba6bee9817b39f.js deleted file mode 100644 index a0f30bc81..000000000 Binary files a/priv/static/static/js/22.132b7fba6bee9817b39f.js and /dev/null differ diff --git a/priv/static/static/js/22.132b7fba6bee9817b39f.js.map b/priv/static/static/js/22.132b7fba6bee9817b39f.js.map deleted file mode 100644 index 5b54e2be5..000000000 Binary files a/priv/static/static/js/22.132b7fba6bee9817b39f.js.map and /dev/null differ diff --git a/priv/static/static/js/22.dbc79965f66b0bb62d88.js b/priv/static/static/js/22.dbc79965f66b0bb62d88.js new file mode 100644 index 000000000..88a0e51b5 Binary files /dev/null and b/priv/static/static/js/22.dbc79965f66b0bb62d88.js differ diff --git a/priv/static/static/js/22.dbc79965f66b0bb62d88.js.map b/priv/static/static/js/22.dbc79965f66b0bb62d88.js.map new file mode 100644 index 000000000..a43e0a6b4 Binary files /dev/null and b/priv/static/static/js/22.dbc79965f66b0bb62d88.js.map differ diff --git a/priv/static/static/js/23.4addb03e0862c780c55f.js b/priv/static/static/js/23.4addb03e0862c780c55f.js new file mode 100644 index 000000000..40d2fb0b3 Binary files /dev/null and b/priv/static/static/js/23.4addb03e0862c780c55f.js differ diff --git a/priv/static/static/js/23.4addb03e0862c780c55f.js.map b/priv/static/static/js/23.4addb03e0862c780c55f.js.map new file mode 100644 index 000000000..3ab3410ee Binary files /dev/null and b/priv/static/static/js/23.4addb03e0862c780c55f.js.map differ diff --git a/priv/static/static/js/23.63b95894e9f0eb300da0.js b/priv/static/static/js/23.63b95894e9f0eb300da0.js deleted file mode 100644 index aeef30063..000000000 Binary files a/priv/static/static/js/23.63b95894e9f0eb300da0.js and /dev/null differ diff --git a/priv/static/static/js/23.63b95894e9f0eb300da0.js.map b/priv/static/static/js/23.63b95894e9f0eb300da0.js.map deleted file mode 100644 index dbd9ba11e..000000000 Binary files a/priv/static/static/js/23.63b95894e9f0eb300da0.js.map and /dev/null differ diff --git a/priv/static/static/js/24.10dc1eadca8b0bc15e20.js b/priv/static/static/js/24.10dc1eadca8b0bc15e20.js deleted file mode 100644 index ed3bab7cc..000000000 Binary files a/priv/static/static/js/24.10dc1eadca8b0bc15e20.js and /dev/null differ diff --git a/priv/static/static/js/24.10dc1eadca8b0bc15e20.js.map b/priv/static/static/js/24.10dc1eadca8b0bc15e20.js.map deleted file mode 100644 index 82709d683..000000000 Binary files a/priv/static/static/js/24.10dc1eadca8b0bc15e20.js.map and /dev/null differ diff --git a/priv/static/static/js/24.e4b623be1780a14a6168.js b/priv/static/static/js/24.e4b623be1780a14a6168.js new file mode 100644 index 000000000..eadbce6d5 Binary files /dev/null and b/priv/static/static/js/24.e4b623be1780a14a6168.js differ diff --git a/priv/static/static/js/24.e4b623be1780a14a6168.js.map b/priv/static/static/js/24.e4b623be1780a14a6168.js.map new file mode 100644 index 000000000..5a1291203 Binary files /dev/null and b/priv/static/static/js/24.e4b623be1780a14a6168.js.map differ diff --git a/priv/static/static/js/25.34eeae0070f7f1eb6843.js b/priv/static/static/js/25.34eeae0070f7f1eb6843.js new file mode 100644 index 000000000..92130ae8e Binary files /dev/null and b/priv/static/static/js/25.34eeae0070f7f1eb6843.js differ diff --git a/priv/static/static/js/25.34eeae0070f7f1eb6843.js.map b/priv/static/static/js/25.34eeae0070f7f1eb6843.js.map new file mode 100644 index 000000000..2af21b09b Binary files /dev/null and b/priv/static/static/js/25.34eeae0070f7f1eb6843.js.map differ diff --git a/priv/static/static/js/25.e2e834e1b024960e0087.js b/priv/static/static/js/25.e2e834e1b024960e0087.js deleted file mode 100644 index c2caf0d62..000000000 Binary files a/priv/static/static/js/25.e2e834e1b024960e0087.js and /dev/null differ diff --git a/priv/static/static/js/25.e2e834e1b024960e0087.js.map b/priv/static/static/js/25.e2e834e1b024960e0087.js.map deleted file mode 100644 index e4967e625..000000000 Binary files a/priv/static/static/js/25.e2e834e1b024960e0087.js.map and /dev/null differ diff --git a/priv/static/static/js/26.74667f919f7bad826ea0.js b/priv/static/static/js/26.74667f919f7bad826ea0.js deleted file mode 100644 index 712c57182..000000000 Binary files a/priv/static/static/js/26.74667f919f7bad826ea0.js and /dev/null differ diff --git a/priv/static/static/js/26.74667f919f7bad826ea0.js.map b/priv/static/static/js/26.74667f919f7bad826ea0.js.map deleted file mode 100644 index 43a64a1fb..000000000 Binary files a/priv/static/static/js/26.74667f919f7bad826ea0.js.map and /dev/null differ diff --git a/priv/static/static/js/26.bd86a0d958de2bb3905a.js b/priv/static/static/js/26.bd86a0d958de2bb3905a.js new file mode 100644 index 000000000..64c5db6ed Binary files /dev/null and b/priv/static/static/js/26.bd86a0d958de2bb3905a.js differ diff --git a/priv/static/static/js/26.bd86a0d958de2bb3905a.js.map b/priv/static/static/js/26.bd86a0d958de2bb3905a.js.map new file mode 100644 index 000000000..a2e972c31 Binary files /dev/null and b/priv/static/static/js/26.bd86a0d958de2bb3905a.js.map differ diff --git a/priv/static/static/js/27.0af03540f78df63eddca.js b/priv/static/static/js/27.0af03540f78df63eddca.js deleted file mode 100644 index 86d8c0045..000000000 Binary files a/priv/static/static/js/27.0af03540f78df63eddca.js and /dev/null differ diff --git a/priv/static/static/js/27.0af03540f78df63eddca.js.map b/priv/static/static/js/27.0af03540f78df63eddca.js.map deleted file mode 100644 index a1e846519..000000000 Binary files a/priv/static/static/js/27.0af03540f78df63eddca.js.map and /dev/null differ diff --git a/priv/static/static/js/27.7d4ab8716762d6f57135.js b/priv/static/static/js/27.7d4ab8716762d6f57135.js new file mode 100644 index 000000000..95a37be1f Binary files /dev/null and b/priv/static/static/js/27.7d4ab8716762d6f57135.js differ diff --git a/priv/static/static/js/27.7d4ab8716762d6f57135.js.map b/priv/static/static/js/27.7d4ab8716762d6f57135.js.map new file mode 100644 index 000000000..b9b2aa6e1 Binary files /dev/null and b/priv/static/static/js/27.7d4ab8716762d6f57135.js.map differ diff --git a/priv/static/static/js/28.599a889517f15c01b27e.js b/priv/static/static/js/28.599a889517f15c01b27e.js deleted file mode 100644 index 6f02d5cf6..000000000 Binary files a/priv/static/static/js/28.599a889517f15c01b27e.js and /dev/null differ diff --git a/priv/static/static/js/28.599a889517f15c01b27e.js.map b/priv/static/static/js/28.599a889517f15c01b27e.js.map deleted file mode 100644 index d12cd5dae..000000000 Binary files a/priv/static/static/js/28.599a889517f15c01b27e.js.map and /dev/null differ diff --git a/priv/static/static/js/28.a88999ebb3f7ec930aad.js b/priv/static/static/js/28.a88999ebb3f7ec930aad.js new file mode 100644 index 000000000..423aebca9 Binary files /dev/null and b/priv/static/static/js/28.a88999ebb3f7ec930aad.js differ diff --git a/priv/static/static/js/28.a88999ebb3f7ec930aad.js.map b/priv/static/static/js/28.a88999ebb3f7ec930aad.js.map new file mode 100644 index 000000000..d67ecaec2 Binary files /dev/null and b/priv/static/static/js/28.a88999ebb3f7ec930aad.js.map differ diff --git a/priv/static/static/js/29.3fc5f707254d05a94c4e.js b/priv/static/static/js/29.3fc5f707254d05a94c4e.js deleted file mode 100644 index fbb53794e..000000000 Binary files a/priv/static/static/js/29.3fc5f707254d05a94c4e.js and /dev/null differ diff --git a/priv/static/static/js/29.3fc5f707254d05a94c4e.js.map b/priv/static/static/js/29.3fc5f707254d05a94c4e.js.map deleted file mode 100644 index d9dc3432e..000000000 Binary files a/priv/static/static/js/29.3fc5f707254d05a94c4e.js.map and /dev/null differ diff --git a/priv/static/static/js/29.519f681d194c212ae75f.js b/priv/static/static/js/29.519f681d194c212ae75f.js new file mode 100644 index 000000000..aa2571733 Binary files /dev/null and b/priv/static/static/js/29.519f681d194c212ae75f.js differ diff --git a/priv/static/static/js/29.519f681d194c212ae75f.js.map b/priv/static/static/js/29.519f681d194c212ae75f.js.map new file mode 100644 index 000000000..e9c22ff88 Binary files /dev/null and b/priv/static/static/js/29.519f681d194c212ae75f.js.map differ diff --git a/priv/static/static/js/3.6c8e014d70907359ad5a.js b/priv/static/static/js/3.6c8e014d70907359ad5a.js new file mode 100644 index 000000000..8c925ea7c Binary files /dev/null and b/priv/static/static/js/3.6c8e014d70907359ad5a.js differ diff --git a/priv/static/static/js/3.6c8e014d70907359ad5a.js.map b/priv/static/static/js/3.6c8e014d70907359ad5a.js.map new file mode 100644 index 000000000..81ea16cd3 Binary files /dev/null and b/priv/static/static/js/3.6c8e014d70907359ad5a.js.map differ diff --git a/priv/static/static/js/3.716f85efb43de512faf0.js b/priv/static/static/js/3.716f85efb43de512faf0.js deleted file mode 100644 index c62e430f2..000000000 Binary files a/priv/static/static/js/3.716f85efb43de512faf0.js and /dev/null differ diff --git a/priv/static/static/js/3.716f85efb43de512faf0.js.map b/priv/static/static/js/3.716f85efb43de512faf0.js.map deleted file mode 100644 index 877f25345..000000000 Binary files a/priv/static/static/js/3.716f85efb43de512faf0.js.map and /dev/null differ diff --git a/priv/static/static/js/30.af9dba19236c2e02ceb0.js b/priv/static/static/js/30.af9dba19236c2e02ceb0.js deleted file mode 100644 index dda2ec2cb..000000000 Binary files a/priv/static/static/js/30.af9dba19236c2e02ceb0.js and /dev/null differ diff --git a/priv/static/static/js/30.af9dba19236c2e02ceb0.js.map b/priv/static/static/js/30.af9dba19236c2e02ceb0.js.map deleted file mode 100644 index e3094bf26..000000000 Binary files a/priv/static/static/js/30.af9dba19236c2e02ceb0.js.map and /dev/null differ diff --git a/priv/static/static/js/30.d29cd76b0781bb654f87.js b/priv/static/static/js/30.d29cd76b0781bb654f87.js new file mode 100644 index 000000000..f681595c7 Binary files /dev/null and b/priv/static/static/js/30.d29cd76b0781bb654f87.js differ diff --git a/priv/static/static/js/30.d29cd76b0781bb654f87.js.map b/priv/static/static/js/30.d29cd76b0781bb654f87.js.map new file mode 100644 index 000000000..dbf01dc8d Binary files /dev/null and b/priv/static/static/js/30.d29cd76b0781bb654f87.js.map differ diff --git a/priv/static/static/js/31.15b545bb42e21d39c678.js b/priv/static/static/js/31.15b545bb42e21d39c678.js new file mode 100644 index 000000000..3c5d8089e Binary files /dev/null and b/priv/static/static/js/31.15b545bb42e21d39c678.js differ diff --git a/priv/static/static/js/31.15b545bb42e21d39c678.js.map b/priv/static/static/js/31.15b545bb42e21d39c678.js.map new file mode 100644 index 000000000..b56a26768 Binary files /dev/null and b/priv/static/static/js/31.15b545bb42e21d39c678.js.map differ diff --git a/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js b/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js deleted file mode 100644 index 65edaa3dd..000000000 Binary files a/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js and /dev/null differ diff --git a/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js.map b/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js.map deleted file mode 100644 index 4157d56ad..000000000 Binary files a/priv/static/static/js/31.f4fb830b17ba4aa43cb0.js.map and /dev/null differ diff --git a/priv/static/static/js/32.899035ede0115c5c0f99.js b/priv/static/static/js/32.899035ede0115c5c0f99.js new file mode 100644 index 000000000..6faf5ed33 Binary files /dev/null and b/priv/static/static/js/32.899035ede0115c5c0f99.js differ diff --git a/priv/static/static/js/32.899035ede0115c5c0f99.js.map b/priv/static/static/js/32.899035ede0115c5c0f99.js.map new file mode 100644 index 000000000..242f78de5 Binary files /dev/null and b/priv/static/static/js/32.899035ede0115c5c0f99.js.map differ diff --git a/priv/static/static/js/32.e0c1e549e0806ed8c97e.js b/priv/static/static/js/32.e0c1e549e0806ed8c97e.js deleted file mode 100644 index 12e61f91a..000000000 Binary files a/priv/static/static/js/32.e0c1e549e0806ed8c97e.js and /dev/null differ diff --git a/priv/static/static/js/32.e0c1e549e0806ed8c97e.js.map b/priv/static/static/js/32.e0c1e549e0806ed8c97e.js.map deleted file mode 100644 index a30317255..000000000 Binary files a/priv/static/static/js/32.e0c1e549e0806ed8c97e.js.map and /dev/null differ diff --git a/priv/static/static/js/4.564b2a8cbfe4d5e93949.js b/priv/static/static/js/4.564b2a8cbfe4d5e93949.js new file mode 100644 index 000000000..eb8241c90 Binary files /dev/null and b/priv/static/static/js/4.564b2a8cbfe4d5e93949.js differ diff --git a/priv/static/static/js/4.564b2a8cbfe4d5e93949.js.map b/priv/static/static/js/4.564b2a8cbfe4d5e93949.js.map new file mode 100644 index 000000000..2a235dac2 Binary files /dev/null and b/priv/static/static/js/4.564b2a8cbfe4d5e93949.js.map differ diff --git a/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js b/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js deleted file mode 100644 index 36db0a49a..000000000 Binary files a/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js and /dev/null differ diff --git a/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js.map b/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js.map deleted file mode 100644 index 2885b8635..000000000 Binary files a/priv/static/static/js/4.ae27cb41b81c1d0fb12b.js.map and /dev/null differ diff --git a/priv/static/static/js/5.6024023b2804dafc6bcb.js b/priv/static/static/js/5.6024023b2804dafc6bcb.js new file mode 100644 index 000000000..de5483b7c Binary files /dev/null and b/priv/static/static/js/5.6024023b2804dafc6bcb.js differ diff --git a/priv/static/static/js/5.730f6dd69f3216d24320.js.map b/priv/static/static/js/5.6024023b2804dafc6bcb.js.map similarity index 57% rename from priv/static/static/js/5.730f6dd69f3216d24320.js.map rename to priv/static/static/js/5.6024023b2804dafc6bcb.js.map index f6e5d1301..921907b51 100644 Binary files a/priv/static/static/js/5.730f6dd69f3216d24320.js.map and b/priv/static/static/js/5.6024023b2804dafc6bcb.js.map differ diff --git a/priv/static/static/js/5.730f6dd69f3216d24320.js b/priv/static/static/js/5.730f6dd69f3216d24320.js deleted file mode 100644 index b9f9e7ce8..000000000 Binary files a/priv/static/static/js/5.730f6dd69f3216d24320.js and /dev/null differ diff --git a/priv/static/static/js/6.17d3d7ef67c646d7d9e2.js b/priv/static/static/js/6.17d3d7ef67c646d7d9e2.js deleted file mode 100644 index 7c37a2617..000000000 Binary files a/priv/static/static/js/6.17d3d7ef67c646d7d9e2.js and /dev/null differ diff --git a/priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js b/priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js new file mode 100644 index 000000000..133583967 Binary files /dev/null and b/priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js differ diff --git a/priv/static/static/js/6.17d3d7ef67c646d7d9e2.js.map b/priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js.map similarity index 57% rename from priv/static/static/js/6.17d3d7ef67c646d7d9e2.js.map rename to priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js.map index a86efcd83..962fe57bf 100644 Binary files a/priv/static/static/js/6.17d3d7ef67c646d7d9e2.js.map and b/priv/static/static/js/6.b0c7a2b19cc70c33dc1e.js.map differ diff --git a/priv/static/static/js/7.4dbb03c6731e1c8190af.js b/priv/static/static/js/7.4dbb03c6731e1c8190af.js new file mode 100644 index 000000000..c30fd4d53 Binary files /dev/null and b/priv/static/static/js/7.4dbb03c6731e1c8190af.js differ diff --git a/priv/static/static/js/7.c7fec9856bb057372873.js.map b/priv/static/static/js/7.4dbb03c6731e1c8190af.js.map similarity index 57% rename from priv/static/static/js/7.c7fec9856bb057372873.js.map rename to priv/static/static/js/7.4dbb03c6731e1c8190af.js.map index 953c23427..f89bb6b78 100644 Binary files a/priv/static/static/js/7.c7fec9856bb057372873.js.map and b/priv/static/static/js/7.4dbb03c6731e1c8190af.js.map differ diff --git a/priv/static/static/js/7.c7fec9856bb057372873.js b/priv/static/static/js/7.c7fec9856bb057372873.js deleted file mode 100644 index 3f05de438..000000000 Binary files a/priv/static/static/js/7.c7fec9856bb057372873.js and /dev/null differ diff --git a/priv/static/static/js/8.c3a32861cd869f7892e5.js b/priv/static/static/js/8.c3a32861cd869f7892e5.js deleted file mode 100644 index 1165de321..000000000 Binary files a/priv/static/static/js/8.c3a32861cd869f7892e5.js and /dev/null differ diff --git a/priv/static/static/js/8.d11ae57b3255a1c74681.js b/priv/static/static/js/8.d11ae57b3255a1c74681.js new file mode 100644 index 000000000..7da124f7e Binary files /dev/null and b/priv/static/static/js/8.d11ae57b3255a1c74681.js differ diff --git a/priv/static/static/js/8.c3a32861cd869f7892e5.js.map b/priv/static/static/js/8.d11ae57b3255a1c74681.js.map similarity index 57% rename from priv/static/static/js/8.c3a32861cd869f7892e5.js.map rename to priv/static/static/js/8.d11ae57b3255a1c74681.js.map index 1ae964e3d..c874c5132 100644 Binary files a/priv/static/static/js/8.c3a32861cd869f7892e5.js.map and b/priv/static/static/js/8.d11ae57b3255a1c74681.js.map differ diff --git a/priv/static/static/js/9.2d36a607172a0f72bb59.js b/priv/static/static/js/9.2d36a607172a0f72bb59.js deleted file mode 100644 index def839c6e..000000000 Binary files a/priv/static/static/js/9.2d36a607172a0f72bb59.js and /dev/null differ diff --git a/priv/static/static/js/9.2d36a607172a0f72bb59.js.map b/priv/static/static/js/9.2d36a607172a0f72bb59.js.map deleted file mode 100644 index d7ee040c4..000000000 Binary files a/priv/static/static/js/9.2d36a607172a0f72bb59.js.map and /dev/null differ diff --git a/priv/static/static/js/9.80dc09c85f557dd2c96f.js b/priv/static/static/js/9.80dc09c85f557dd2c96f.js new file mode 100644 index 000000000..77b5edba9 Binary files /dev/null and b/priv/static/static/js/9.80dc09c85f557dd2c96f.js differ diff --git a/priv/static/static/js/9.80dc09c85f557dd2c96f.js.map b/priv/static/static/js/9.80dc09c85f557dd2c96f.js.map new file mode 100644 index 000000000..25360bcab Binary files /dev/null and b/priv/static/static/js/9.80dc09c85f557dd2c96f.js.map differ diff --git a/priv/static/static/js/app.2e518bb8cf82de7a72b0.js b/priv/static/static/js/app.2e518bb8cf82de7a72b0.js deleted file mode 100644 index f610404a0..000000000 Binary files a/priv/static/static/js/app.2e518bb8cf82de7a72b0.js and /dev/null differ diff --git a/priv/static/static/js/app.2e518bb8cf82de7a72b0.js.map b/priv/static/static/js/app.2e518bb8cf82de7a72b0.js.map deleted file mode 100644 index b84a6e676..000000000 Binary files a/priv/static/static/js/app.2e518bb8cf82de7a72b0.js.map and /dev/null differ diff --git a/priv/static/static/js/app.ce97bd1883ee9dd7b809.js b/priv/static/static/js/app.ce97bd1883ee9dd7b809.js new file mode 100644 index 000000000..01bdcff7a Binary files /dev/null and b/priv/static/static/js/app.ce97bd1883ee9dd7b809.js differ diff --git a/priv/static/static/js/app.ce97bd1883ee9dd7b809.js.map b/priv/static/static/js/app.ce97bd1883ee9dd7b809.js.map new file mode 100644 index 000000000..a2669d143 Binary files /dev/null and b/priv/static/static/js/app.ce97bd1883ee9dd7b809.js.map differ diff --git a/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js b/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js deleted file mode 100644 index d44c7f76b..000000000 Binary files a/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js and /dev/null differ diff --git a/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js.map b/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js.map deleted file mode 100644 index 82a20126a..000000000 Binary files a/priv/static/static/js/vendors~app.102a26590d3ba87dd908.js.map and /dev/null differ diff --git a/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js b/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js new file mode 100644 index 000000000..8fdc0a102 Binary files /dev/null and b/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js differ diff --git a/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js.map b/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js.map new file mode 100644 index 000000000..7173d6819 Binary files /dev/null and b/priv/static/static/js/vendors~app.fb9ee54b02db0c974e51.js.map differ diff --git a/priv/static/static/ruffle/LICENSE_APACHE b/priv/static/static/ruffle/LICENSE_APACHE new file mode 100644 index 000000000..1b5ec8b78 --- /dev/null +++ b/priv/static/static/ruffle/LICENSE_APACHE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/priv/static/static/ruffle/LICENSE_MIT b/priv/static/static/ruffle/LICENSE_MIT new file mode 100644 index 000000000..63a286b4f --- /dev/null +++ b/priv/static/static/ruffle/LICENSE_MIT @@ -0,0 +1,25 @@ +Copyright (c) 2018 Mike Welsh + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/priv/static/static/ruffle/README.md b/priv/static/static/ruffle/README.md new file mode 100644 index 000000000..25636e78f --- /dev/null +++ b/priv/static/static/ruffle/README.md @@ -0,0 +1,57 @@ +# ruffle-selfhosted + +ruffle-selfhosted is the intended way to get Ruffle onto your website. + +You may either include it and forget about it, and we will polyfill existing Flash content, +or use our APIs for custom configurations or more advanced usages of the Ruffle player. + +## Using ruffle-selfhosted + +For more examples and in-depth documentation on how to use Ruffle on your website, please +[check out our wiki](https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#web). + +### Host Ruffle + +The `selfhosted` package is configured for websites that do not use bundlers or npm and just want +to get up and running. If you'd prefer to use Ruffle through npm and a bundler, please +[refer to ruffle core](https://github.com/ruffle-rs/ruffle/tree/master/web/packages/core). + +Before you can get started with using Ruffle on your website, you must host its files yourself. +Either take the [latest build](https://github.com/ruffle-rs/ruffle/releases) +or [build it yourself](../../README.md), and make these files accessible by your web server. + +Please note that the `.wasm` file must be served properly, and some web servers may not do that +correctly out of the box. Please see [our wiki](https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-wasm-mime-type) +for instructions on how to configure this, if you encounter a `Incorrect response MIME type` error. + +### "Plug and Play" + +If you have an existing website with flash content, you can simply include Ruffle as a script and +our polyfill magic will replace everything for you. No fuss, no mess. + +```html + +``` + +### Javascript API + +If you want to control the Ruffle player, you may use our Javascript API. + +```html + + +``` + +## Building, testing or contributing + +Please see [the ruffle-web README](../../README.md). diff --git a/priv/static/static/ruffle/af9b9e80cef829d41f6454bfef68d005.wasm b/priv/static/static/ruffle/af9b9e80cef829d41f6454bfef68d005.wasm new file mode 100644 index 000000000..1d1a00d12 Binary files /dev/null and b/priv/static/static/ruffle/af9b9e80cef829d41f6454bfef68d005.wasm differ diff --git a/priv/static/static/ruffle/package.json b/priv/static/static/ruffle/package.json new file mode 100644 index 000000000..6f3cbfbe2 --- /dev/null +++ b/priv/static/static/ruffle/package.json @@ -0,0 +1 @@ +{"name": "ruffle-mirror", "version": "2021.4.11", "description": "This is an auto npm mirror for ruffle nightly builds.", "repository": {"type": "git", "url": "git+https://github.com/rwv/ruffle-mirror.git"}, "author": "ruffle-rs", "license": "MIT", "bugs": {"url": "https://github.com/rwv/ruffle-mirror/issues"}, "homepage": "https://github.com/rwv/ruffle-mirror#readme"} \ No newline at end of file diff --git a/priv/static/static/ruffle/ruffle.js b/priv/static/static/ruffle/ruffle.js new file mode 100644 index 000000000..d4c5a5dd9 Binary files /dev/null and b/priv/static/static/ruffle/ruffle.js differ diff --git a/priv/static/static/ruffle/ruffle.js.map b/priv/static/static/ruffle/ruffle.js.map new file mode 100644 index 000000000..dcbb7add8 Binary files /dev/null and b/priv/static/static/ruffle/ruffle.js.map differ diff --git a/priv/static/sw-pleroma.js b/priv/static/sw-pleroma.js index e42440eb6..5f64e872d 100644 Binary files a/priv/static/sw-pleroma.js and b/priv/static/sw-pleroma.js differ diff --git a/priv/static/sw-pleroma.js.map b/priv/static/sw-pleroma.js.map index d4c2345e0..a538b769e 100644 Binary files a/priv/static/sw-pleroma.js.map and b/priv/static/sw-pleroma.js.map differ diff --git a/test/pleroma/config/deprecation_warnings_test.exs b/test/pleroma/config/deprecation_warnings_test.exs index ccf86634f..c5e2b20f4 100644 --- a/test/pleroma/config/deprecation_warnings_test.exs +++ b/test/pleroma/config/deprecation_warnings_test.exs @@ -11,6 +11,183 @@ defmodule Pleroma.Config.DeprecationWarningsTest do alias Pleroma.Config alias Pleroma.Config.DeprecationWarnings + describe "simple policy tuples" do + test "gives warning when there are still strings" do + clear_config([:mrf_simple], + media_removal: ["some.removal"], + media_nsfw: ["some.nsfw"], + federated_timeline_removal: ["some.tl.removal"], + report_removal: ["some.report.removal"], + reject: ["some.reject"], + followers_only: ["some.followers.only"], + accept: ["some.accept"], + avatar_removal: ["some.avatar.removal"], + banner_removal: ["some.banner.removal"], + reject_deletes: ["some.reject.deletes"] + ) + + assert capture_log(fn -> DeprecationWarnings.check_simple_policy_tuples() end) =~ + """ + !!!DEPRECATION WARNING!!! + Your config is using strings in the SimplePolicy configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :mrf_simple, + media_removal: ["instance.tld"], + media_nsfw: ["instance.tld"], + federated_timeline_removal: ["instance.tld"], + report_removal: ["instance.tld"], + reject: ["instance.tld"], + followers_only: ["instance.tld"], + accept: ["instance.tld"], + avatar_removal: ["instance.tld"], + banner_removal: ["instance.tld"], + reject_deletes: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :mrf_simple, + media_removal: [{"instance.tld", "Reason for media removal"}], + media_nsfw: [{"instance.tld", "Reason for media nsfw"}], + federated_timeline_removal: [{"instance.tld", "Reason for federated timeline removal"}], + report_removal: [{"instance.tld", "Reason for report removal"}], + reject: [{"instance.tld", "Reason for reject"}], + followers_only: [{"instance.tld", "Reason for followers only"}], + accept: [{"instance.tld", "Reason for accept"}], + avatar_removal: [{"instance.tld", "Reason for avatar removal"}], + banner_removal: [{"instance.tld", "Reason for banner removal"}], + reject_deletes: [{"instance.tld", "Reason for reject deletes"}] + ``` + """ + end + + test "transforms config to tuples" do + clear_config([:mrf_simple], + media_removal: ["some.removal", {"some.other.instance", "Some reason"}] + ) + + expected_config = [ + {:media_removal, [{"some.removal", ""}, {"some.other.instance", "Some reason"}]} + ] + + capture_log(fn -> DeprecationWarnings.warn() end) + + assert Config.get([:mrf_simple]) == expected_config + end + + test "doesn't give a warning with correct config" do + clear_config([:mrf_simple], + media_removal: [{"some.removal", ""}, {"some.other.instance", "Some reason"}] + ) + + assert capture_log(fn -> DeprecationWarnings.check_simple_policy_tuples() end) == "" + end + end + + describe "quarantined_instances tuples" do + test "gives warning when there are still strings" do + clear_config([:instance, :quarantined_instances], [ + {"domain.com", "some reason"}, + "somedomain.tld" + ]) + + assert capture_log(fn -> DeprecationWarnings.check_quarantined_instances_tuples() end) =~ + """ + !!!DEPRECATION WARNING!!! + Your config is using strings in the quarantined_instances configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :instance, + quarantined_instances: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :instance, + quarantined_instances: [{"instance.tld", "Reason for quarantine"}] + ``` + """ + end + + test "transforms config to tuples" do + clear_config([:instance, :quarantined_instances], [ + {"domain.com", "some reason"}, + "some.tld" + ]) + + expected_config = [{"domain.com", "some reason"}, {"some.tld", ""}] + + capture_log(fn -> DeprecationWarnings.warn() end) + + assert Config.get([:instance, :quarantined_instances]) == expected_config + end + + test "doesn't give a warning with correct config" do + clear_config([:instance, :quarantined_instances], [ + {"domain.com", "some reason"}, + {"some.tld", ""} + ]) + + assert capture_log(fn -> DeprecationWarnings.check_quarantined_instances_tuples() end) == "" + end + end + + describe "transparency_exclusions tuples" do + test "gives warning when there are still strings" do + clear_config([:mrf, :transparency_exclusions], [ + {"domain.com", "some reason"}, + "somedomain.tld" + ]) + + assert capture_log(fn -> DeprecationWarnings.check_transparency_exclusions_tuples() end) =~ + """ + !!!DEPRECATION WARNING!!! + Your config is using strings in the transparency_exclusions configuration instead of tuples. They should work for now, but you are advised to change to the new configuration to prevent possible issues later: + + ``` + config :pleroma, :mrf, + transparency_exclusions: ["instance.tld"] + ``` + + Is now + + + ``` + config :pleroma, :mrf, + transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}] + ``` + """ + end + + test "transforms config to tuples" do + clear_config([:mrf, :transparency_exclusions], [ + {"domain.com", "some reason"}, + "some.tld" + ]) + + expected_config = [{"domain.com", "some reason"}, {"some.tld", ""}] + + capture_log(fn -> DeprecationWarnings.warn() end) + + assert Config.get([:mrf, :transparency_exclusions]) == expected_config + end + + test "doesn't give a warning with correct config" do + clear_config([:mrf, :transparency_exclusions], [ + {"domain.com", "some reason"}, + {"some.tld", ""} + ]) + + assert capture_log(fn -> DeprecationWarnings.check_transparency_exclusions_tuples() end) == + "" + end + end + test "check_old_mrf_config/0" do clear_config([:instance, :rewrite_policy], []) clear_config([:instance, :mrf_transparency], true) diff --git a/test/pleroma/docs/generator_test.exs b/test/pleroma/docs/generator_test.exs index a9b09e577..8574c1d5e 100644 --- a/test/pleroma/docs/generator_test.exs +++ b/test/pleroma/docs/generator_test.exs @@ -23,7 +23,7 @@ defmodule Pleroma.Docs.GeneratorTest do key: :filters, type: {:list, :module}, description: "", - suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF} + suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF.Policy} }, %{ key: Pleroma.Upload, diff --git a/test/pleroma/notification_test.exs b/test/pleroma/notification_test.exs index 85f895f0f..716af496d 100644 --- a/test/pleroma/notification_test.exs +++ b/test/pleroma/notification_test.exs @@ -129,6 +129,19 @@ test "does not create a notification for subscribed users if status is a reply" end end + test "create_poll_notifications/1" do + [user1, user2, user3, _, _] = insert_list(5, :user) + question = insert(:question, user: user1) + activity = insert(:question_activity, question: question) + + {:ok, _, _} = CommonAPI.vote(user2, question, [0]) + {:ok, _, _} = CommonAPI.vote(user3, question, [1]) + + {:ok, notifications} = Notification.create_poll_notifications(activity) + + assert [user2.id, user3.id, user1.id] == Enum.map(notifications, & &1.user_id) + end + describe "CommonApi.post/2 notification-related functionality" do test_with_mock "creates but does NOT send notification to blocker user", Push, diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs index 4021a565d..c2ed2c2a3 100644 --- a/test/pleroma/user_test.exs +++ b/test/pleroma/user_test.exs @@ -480,7 +480,7 @@ test "it sends a welcome chat message if it is set" do ) test "it sends a welcome chat message when Simple policy applied to local instance" do - clear_config([:mrf_simple, :media_nsfw], ["localhost"]) + clear_config([:mrf_simple, :media_nsfw], [{"localhost", ""}]) welcome_user = insert(:user) clear_config([:welcome, :chat_message, :enabled], true) diff --git a/test/pleroma/web/activity_pub/builder_test.exs b/test/pleroma/web/activity_pub/builder_test.exs new file mode 100644 index 000000000..3fe32bce5 --- /dev/null +++ b/test/pleroma/web/activity_pub/builder_test.exs @@ -0,0 +1,48 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2021 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.ActivityPub.BuilderTest do + alias Pleroma.Web.ActivityPub.Builder + alias Pleroma.Web.CommonAPI.ActivityDraft + use Pleroma.DataCase + + import Pleroma.Factory + + describe "note/1" do + test "returns note data" do + user = insert(:user) + note = insert(:note) + user2 = insert(:user) + user3 = insert(:user) + + draft = %ActivityDraft{ + user: user, + to: [user2.ap_id], + context: "2hu", + content_html: "

This is :moominmamma: note

", + in_reply_to: note.id, + tags: [name: "jimm"], + summary: "test summary", + cc: [user3.ap_id], + extra: %{"custom_tag" => "test"} + } + + expected = %{ + "actor" => user.ap_id, + "attachment" => [], + "cc" => [user3.ap_id], + "content" => "

This is :moominmamma: note

", + "context" => "2hu", + "sensitive" => false, + "summary" => "test summary", + "tag" => ["jimm"], + "to" => [user2.ap_id], + "type" => "Note", + "custom_tag" => "test" + } + + assert {:ok, ^expected, []} = Builder.note(draft) + end + end +end diff --git a/test/pleroma/web/activity_pub/mrf/object_age_policy_test.exs b/test/pleroma/web/activity_pub/mrf/object_age_policy_test.exs index 137aafd39..2f649a0a4 100644 --- a/test/pleroma/web/activity_pub/mrf/object_age_policy_test.exs +++ b/test/pleroma/web/activity_pub/mrf/object_age_policy_test.exs @@ -22,6 +22,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicyTest do defp get_old_message do File.read!("test/fixtures/mastodon-post-activity.json") |> Jason.decode!() + |> Map.drop(["published"]) end defp get_new_message do diff --git a/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs b/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs index 0b0143d09..0a0f51bdb 100644 --- a/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs +++ b/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs @@ -33,7 +33,7 @@ test "is empty" do end test "has a matching host" do - clear_config([:mrf_simple, :media_removal], ["remote.instance"]) + clear_config([:mrf_simple, :media_removal], [{"remote.instance", "Some reason"}]) media_message = build_media_message() local_message = build_local_message() @@ -46,7 +46,7 @@ test "has a matching host" do end test "match with wildcard domain" do - clear_config([:mrf_simple, :media_removal], ["*.remote.instance"]) + clear_config([:mrf_simple, :media_removal], [{"*.remote.instance", "Whatever reason"}]) media_message = build_media_message() local_message = build_local_message() @@ -70,7 +70,7 @@ test "is empty" do end test "has a matching host" do - clear_config([:mrf_simple, :media_nsfw], ["remote.instance"]) + clear_config([:mrf_simple, :media_nsfw], [{"remote.instance", "Whetever"}]) media_message = build_media_message() local_message = build_local_message() @@ -81,7 +81,7 @@ test "has a matching host" do end test "match with wildcard domain" do - clear_config([:mrf_simple, :media_nsfw], ["*.remote.instance"]) + clear_config([:mrf_simple, :media_nsfw], [{"*.remote.instance", "yeah yeah"}]) media_message = build_media_message() local_message = build_local_message() @@ -115,7 +115,7 @@ test "is empty" do end test "has a matching host" do - clear_config([:mrf_simple, :report_removal], ["remote.instance"]) + clear_config([:mrf_simple, :report_removal], [{"remote.instance", "muh"}]) report_message = build_report_message() local_message = build_local_message() @@ -124,7 +124,7 @@ test "has a matching host" do end test "match with wildcard domain" do - clear_config([:mrf_simple, :report_removal], ["*.remote.instance"]) + clear_config([:mrf_simple, :report_removal], [{"*.remote.instance", "suya"}]) report_message = build_report_message() local_message = build_local_message() @@ -159,7 +159,7 @@ test "has a matching host" do |> URI.parse() |> Map.fetch!(:host) - clear_config([:mrf_simple, :federated_timeline_removal], [ftl_message_actor_host]) + clear_config([:mrf_simple, :federated_timeline_removal], [{ftl_message_actor_host, "uwu"}]) local_message = build_local_message() assert {:ok, ftl_message} = SimplePolicy.filter(ftl_message) @@ -180,7 +180,10 @@ test "match with wildcard domain" do |> URI.parse() |> Map.fetch!(:host) - clear_config([:mrf_simple, :federated_timeline_removal], ["*." <> ftl_message_actor_host]) + clear_config([:mrf_simple, :federated_timeline_removal], [ + {"*." <> ftl_message_actor_host, "owo"} + ]) + local_message = build_local_message() assert {:ok, ftl_message} = SimplePolicy.filter(ftl_message) @@ -203,7 +206,9 @@ test "has a matching host but only as:Public in to" do ftl_message = Map.put(ftl_message, "cc", []) - clear_config([:mrf_simple, :federated_timeline_removal], [ftl_message_actor_host]) + clear_config([:mrf_simple, :federated_timeline_removal], [ + {ftl_message_actor_host, "spiderwaifu goes 88w88"} + ]) assert {:ok, ftl_message} = SimplePolicy.filter(ftl_message) refute "https://www.w3.org/ns/activitystreams#Public" in ftl_message["to"] @@ -232,7 +237,7 @@ test "is empty" do end test "activity has a matching host" do - clear_config([:mrf_simple, :reject], ["remote.instance"]) + clear_config([:mrf_simple, :reject], [{"remote.instance", ""}]) remote_message = build_remote_message() @@ -240,7 +245,7 @@ test "activity has a matching host" do end test "activity matches with wildcard domain" do - clear_config([:mrf_simple, :reject], ["*.remote.instance"]) + clear_config([:mrf_simple, :reject], [{"*.remote.instance", ""}]) remote_message = build_remote_message() @@ -248,7 +253,7 @@ test "activity matches with wildcard domain" do end test "actor has a matching host" do - clear_config([:mrf_simple, :reject], ["remote.instance"]) + clear_config([:mrf_simple, :reject], [{"remote.instance", ""}]) remote_user = build_remote_user() @@ -256,7 +261,7 @@ test "actor has a matching host" do end test "reject Announce when object would be rejected" do - clear_config([:mrf_simple, :reject], ["blocked.tld"]) + clear_config([:mrf_simple, :reject], [{"blocked.tld", ""}]) announce = %{ "type" => "Announce", @@ -268,7 +273,7 @@ test "reject Announce when object would be rejected" do end test "reject by URI object" do - clear_config([:mrf_simple, :reject], ["blocked.tld"]) + clear_config([:mrf_simple, :reject], [{"blocked.tld", ""}]) announce = %{ "type" => "Announce", @@ -322,7 +327,7 @@ test "has a matching host" do |> URI.parse() |> Map.fetch!(:host) - clear_config([:mrf_simple, :followers_only], [actor_domain]) + clear_config([:mrf_simple, :followers_only], [{actor_domain, ""}]) assert {:ok, new_activity} = SimplePolicy.filter(activity) assert actor.follower_address in new_activity["cc"] @@ -350,7 +355,7 @@ test "is empty" do end test "is not empty but activity doesn't have a matching host" do - clear_config([:mrf_simple, :accept], ["non.matching.remote"]) + clear_config([:mrf_simple, :accept], [{"non.matching.remote", ""}]) local_message = build_local_message() remote_message = build_remote_message() @@ -360,7 +365,7 @@ test "is not empty but activity doesn't have a matching host" do end test "activity has a matching host" do - clear_config([:mrf_simple, :accept], ["remote.instance"]) + clear_config([:mrf_simple, :accept], [{"remote.instance", ""}]) local_message = build_local_message() remote_message = build_remote_message() @@ -370,7 +375,7 @@ test "activity has a matching host" do end test "activity matches with wildcard domain" do - clear_config([:mrf_simple, :accept], ["*.remote.instance"]) + clear_config([:mrf_simple, :accept], [{"*.remote.instance", ""}]) local_message = build_local_message() remote_message = build_remote_message() @@ -380,7 +385,7 @@ test "activity matches with wildcard domain" do end test "actor has a matching host" do - clear_config([:mrf_simple, :accept], ["remote.instance"]) + clear_config([:mrf_simple, :accept], [{"remote.instance", ""}]) remote_user = build_remote_user() @@ -398,7 +403,7 @@ test "is empty" do end test "is not empty but it doesn't have a matching host" do - clear_config([:mrf_simple, :avatar_removal], ["non.matching.remote"]) + clear_config([:mrf_simple, :avatar_removal], [{"non.matching.remote", ""}]) remote_user = build_remote_user() @@ -406,7 +411,7 @@ test "is not empty but it doesn't have a matching host" do end test "has a matching host" do - clear_config([:mrf_simple, :avatar_removal], ["remote.instance"]) + clear_config([:mrf_simple, :avatar_removal], [{"remote.instance", ""}]) remote_user = build_remote_user() {:ok, filtered} = SimplePolicy.filter(remote_user) @@ -415,7 +420,7 @@ test "has a matching host" do end test "match with wildcard domain" do - clear_config([:mrf_simple, :avatar_removal], ["*.remote.instance"]) + clear_config([:mrf_simple, :avatar_removal], [{"*.remote.instance", ""}]) remote_user = build_remote_user() {:ok, filtered} = SimplePolicy.filter(remote_user) @@ -434,7 +439,7 @@ test "is empty" do end test "is not empty but it doesn't have a matching host" do - clear_config([:mrf_simple, :banner_removal], ["non.matching.remote"]) + clear_config([:mrf_simple, :banner_removal], [{"non.matching.remote", ""}]) remote_user = build_remote_user() @@ -442,7 +447,7 @@ test "is not empty but it doesn't have a matching host" do end test "has a matching host" do - clear_config([:mrf_simple, :banner_removal], ["remote.instance"]) + clear_config([:mrf_simple, :banner_removal], [{"remote.instance", ""}]) remote_user = build_remote_user() {:ok, filtered} = SimplePolicy.filter(remote_user) @@ -451,7 +456,7 @@ test "has a matching host" do end test "match with wildcard domain" do - clear_config([:mrf_simple, :banner_removal], ["*.remote.instance"]) + clear_config([:mrf_simple, :banner_removal], [{"*.remote.instance", ""}]) remote_user = build_remote_user() {:ok, filtered} = SimplePolicy.filter(remote_user) @@ -464,7 +469,7 @@ test "match with wildcard domain" do setup do: clear_config([:mrf_simple, :reject_deletes], []) test "it accepts deletions even from rejected servers" do - clear_config([:mrf_simple, :reject], ["remote.instance"]) + clear_config([:mrf_simple, :reject], [{"remote.instance", ""}]) deletion_message = build_remote_deletion_message() @@ -472,7 +477,7 @@ test "it accepts deletions even from rejected servers" do end test "it accepts deletions even from non-whitelisted servers" do - clear_config([:mrf_simple, :accept], ["non.matching.remote"]) + clear_config([:mrf_simple, :accept], [{"non.matching.remote", ""}]) deletion_message = build_remote_deletion_message() @@ -481,10 +486,10 @@ test "it accepts deletions even from non-whitelisted servers" do end describe "when :reject_deletes is not empty but it doesn't have a matching host" do - setup do: clear_config([:mrf_simple, :reject_deletes], ["non.matching.remote"]) + setup do: clear_config([:mrf_simple, :reject_deletes], [{"non.matching.remote", ""}]) test "it accepts deletions even from rejected servers" do - clear_config([:mrf_simple, :reject], ["remote.instance"]) + clear_config([:mrf_simple, :reject], [{"remote.instance", ""}]) deletion_message = build_remote_deletion_message() @@ -492,7 +497,7 @@ test "it accepts deletions even from rejected servers" do end test "it accepts deletions even from non-whitelisted servers" do - clear_config([:mrf_simple, :accept], ["non.matching.remote"]) + clear_config([:mrf_simple, :accept], [{"non.matching.remote", ""}]) deletion_message = build_remote_deletion_message() @@ -501,7 +506,7 @@ test "it accepts deletions even from non-whitelisted servers" do end describe "when :reject_deletes has a matching host" do - setup do: clear_config([:mrf_simple, :reject_deletes], ["remote.instance"]) + setup do: clear_config([:mrf_simple, :reject_deletes], [{"remote.instance", ""}]) test "it rejects the deletion" do deletion_message = build_remote_deletion_message() @@ -511,7 +516,7 @@ test "it rejects the deletion" do end describe "when :reject_deletes match with wildcard domain" do - setup do: clear_config([:mrf_simple, :reject_deletes], ["*.remote.instance"]) + setup do: clear_config([:mrf_simple, :reject_deletes], [{"*.remote.instance", ""}]) test "it rejects the deletion" do deletion_message = build_remote_deletion_message() diff --git a/test/pleroma/web/activity_pub/mrf_test.exs b/test/pleroma/web/activity_pub/mrf_test.exs index 61d308b97..6ab27bc86 100644 --- a/test/pleroma/web/activity_pub/mrf_test.exs +++ b/test/pleroma/web/activity_pub/mrf_test.exs @@ -63,6 +63,15 @@ test "matches are case-insensitive" do end end + describe "instance_list_from_tuples/1" do + test "returns a list of instances from a list of {instance, reason} tuples" do + list = [{"some.tld", "a reason"}, {"other.tld", "another reason"}] + expected = ["some.tld", "other.tld"] + + assert MRF.instance_list_from_tuples(list) == expected + end + end + describe "describe/0" do test "it works as expected with noop policy" do clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.NoOpPolicy]) diff --git a/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs b/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs index 320854187..def2a10b4 100644 --- a/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs +++ b/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs @@ -68,7 +68,7 @@ test "let's through some basic html", %{user: user, recipient: recipient} do test "validates for a basic object we build", %{valid_chat_message: valid_chat_message} do assert {:ok, object, _meta} = ObjectValidator.validate(valid_chat_message, []) - assert Map.put(valid_chat_message, "attachment", nil) == object + assert valid_chat_message == object assert match?(%{"firefox" => _}, object["emoji"]) end diff --git a/test/pleroma/web/activity_pub/publisher_test.exs b/test/pleroma/web/activity_pub/publisher_test.exs index 89f3ad411..b50e22bbe 100644 --- a/test/pleroma/web/activity_pub/publisher_test.exs +++ b/test/pleroma/web/activity_pub/publisher_test.exs @@ -267,6 +267,80 @@ test "publish to url with with different ports" do end describe "publish/2" do + test_with_mock "doesn't publish a non-public activity to quarantined instances.", + Pleroma.Web.Federator.Publisher, + [:passthrough], + [] do + Config.put([:instance, :quarantined_instances], [{"domain.com", "some reason"}]) + + follower = + insert(:user, %{ + local: false, + inbox: "https://domain.com/users/nick1/inbox", + ap_enabled: true + }) + + actor = insert(:user, follower_address: follower.ap_id) + + {:ok, follower, actor} = Pleroma.User.follow(follower, actor) + actor = refresh_record(actor) + + note_activity = + insert(:followers_only_note_activity, + user: actor, + recipients: [follower.ap_id] + ) + + res = Publisher.publish(actor, note_activity) + + assert res == :ok + + assert not called( + Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{ + inbox: "https://domain.com/users/nick1/inbox", + actor_id: actor.id, + id: note_activity.data["id"] + }) + ) + end + + test_with_mock "Publishes a non-public activity to non-quarantined instances.", + Pleroma.Web.Federator.Publisher, + [:passthrough], + [] do + Config.put([:instance, :quarantined_instances], [{"somedomain.com", "some reason"}]) + + follower = + insert(:user, %{ + local: false, + inbox: "https://domain.com/users/nick1/inbox", + ap_enabled: true + }) + + actor = insert(:user, follower_address: follower.ap_id) + + {:ok, follower, actor} = Pleroma.User.follow(follower, actor) + actor = refresh_record(actor) + + note_activity = + insert(:followers_only_note_activity, + user: actor, + recipients: [follower.ap_id] + ) + + res = Publisher.publish(actor, note_activity) + + assert res == :ok + + assert called( + Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{ + inbox: "https://domain.com/users/nick1/inbox", + actor_id: actor.id, + id: note_activity.data["id"] + }) + ) + end + test_with_mock "publishes an activity with BCC to all relevant peers.", Pleroma.Web.Federator.Publisher, [:passthrough], diff --git a/test/pleroma/web/activity_pub/side_effects_test.exs b/test/pleroma/web/activity_pub/side_effects_test.exs index 13167f50a..d0988619d 100644 --- a/test/pleroma/web/activity_pub/side_effects_test.exs +++ b/test/pleroma/web/activity_pub/side_effects_test.exs @@ -157,6 +157,30 @@ test "creates a notification", %{emoji_react: emoji_react, poster: poster} do end end + describe "Question objects" do + setup do + user = insert(:user) + question = build(:question, user: user) + question_activity = build(:question_activity, question: question) + activity_data = Map.put(question_activity.data, "object", question.data["id"]) + meta = [object_data: question.data, local: false] + + {:ok, activity, meta} = ActivityPub.persist(activity_data, meta) + + %{activity: activity, meta: meta} + end + + test "enqueues the poll end", %{activity: activity, meta: meta} do + {:ok, activity, meta} = SideEffects.handle(activity, meta) + + assert_enqueued( + worker: Pleroma.Workers.PollWorker, + args: %{op: "poll_end", activity_id: activity.id}, + scheduled_at: NaiveDateTime.from_iso8601!(meta[:object_data]["closed"]) + ) + end + end + describe "delete users with confirmation pending" do setup do user = insert(:user, is_confirmed: false) diff --git a/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs index a929f828d..a0942ce8b 100644 --- a/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier/audio_handling_test.exs @@ -73,16 +73,12 @@ test "Funkwhale Audio object" do %{ "mediaType" => "audio/ogg", "type" => "Link", - "name" => nil, - "blurhash" => nil, "url" => [ %{ "href" => "https://channels.tests.funkwhale.audio/api/v1/listen/3901e5d8-0445-49d5-9711-e096cf32e515/?upload=42342395-0208-4fee-a38d-259a6dae0871&download=false", "mediaType" => "audio/ogg", - "type" => "Link", - "width" => nil, - "height" => nil + "type" => "Link" } ] } diff --git a/test/pleroma/web/activity_pub/transmogrifier/video_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/video_handling_test.exs index 62b4a2cb3..fc3ec7450 100644 --- a/test/pleroma/web/activity_pub/transmogrifier/video_handling_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier/video_handling_test.exs @@ -53,16 +53,12 @@ test "it remaps video URLs as attachments if necessary" do %{ "type" => "Link", "mediaType" => "video/mp4", - "name" => nil, - "blurhash" => nil, "url" => [ %{ "href" => "https://peertube.moe/static/webseed/df5f464b-be8d-46fb-ad81-2d4c2d1630e3-480.mp4", "mediaType" => "video/mp4", - "type" => "Link", - "width" => nil, - "height" => nil + "type" => "Link" } ] } @@ -78,16 +74,12 @@ test "it remaps video URLs as attachments if necessary" do %{ "type" => "Link", "mediaType" => "video/mp4", - "name" => nil, - "blurhash" => nil, "url" => [ %{ "href" => "https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4", "mediaType" => "video/mp4", - "type" => "Link", - "width" => nil, - "height" => nil + "type" => "Link" } ] } @@ -110,16 +102,12 @@ test "it works for peertube videos with only their mpegURL map" do %{ "type" => "Link", "mediaType" => "video/mp4", - "name" => nil, - "blurhash" => nil, "url" => [ %{ "href" => "https://peertube.stream/static/streaming-playlists/hls/abece3c3-b9c6-47f4-8040-f3eed8c602e6/abece3c3-b9c6-47f4-8040-f3eed8c602e6-1080-fragmented.mp4", "mediaType" => "video/mp4", - "type" => "Link", - "width" => nil, - "height" => nil + "type" => "Link" } ] } diff --git a/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs b/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs index bc827cc12..200682ba9 100644 --- a/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs @@ -42,6 +42,20 @@ test "it lists available frontends", %{conn: conn} do refute Enum.any?(response, fn frontend -> frontend["installed"] == true end) end + + test "it lists available frontends when no frontend folder was created yet", %{conn: conn} do + File.rm_rf(@dir) + + response = + conn + |> get("/api/pleroma/admin/frontends") + |> json_response_and_validate_schema(:ok) + + assert Enum.map(response, & &1["name"]) == + Enum.map(Config.get([:frontends, :available]), fn {_, map} -> map["name"] end) + + refute Enum.any?(response, fn frontend -> frontend["installed"] == true end) + end end describe "POST /api/pleroma/admin/frontends/install" do diff --git a/test/pleroma/web/common_api/utils_test.exs b/test/pleroma/web/common_api/utils_test.exs index b0e567ff0..d8fec3520 100644 --- a/test/pleroma/web/common_api/utils_test.exs +++ b/test/pleroma/web/common_api/utils_test.exs @@ -681,41 +681,6 @@ test "returns original params when list not found" do end end - describe "make_note_data/1" do - test "returns note data" do - user = insert(:user) - note = insert(:note) - user2 = insert(:user) - user3 = insert(:user) - - draft = %ActivityDraft{ - user: user, - to: [user2.ap_id], - context: "2hu", - content_html: "

This is :moominmamma: note

", - in_reply_to: note.id, - tags: [name: "jimm"], - summary: "test summary", - cc: [user3.ap_id], - extra: %{"custom_tag" => "test"} - } - - assert Utils.make_note_data(draft) == %{ - "actor" => user.ap_id, - "attachment" => [], - "cc" => [user3.ap_id], - "content" => "

This is :moominmamma: note

", - "context" => "2hu", - "sensitive" => false, - "summary" => "test summary", - "tag" => ["jimm"], - "to" => [user2.ap_id], - "type" => "Note", - "custom_tag" => "test" - } - end - end - describe "maybe_add_attachments/3" do test "returns parsed results when attachment_links is false" do assert Utils.maybe_add_attachments( diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index a5dfd3934..4a10a5bc4 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -18,6 +18,7 @@ defmodule Pleroma.Web.CommonAPITest do alias Pleroma.Web.ActivityPub.Visibility alias Pleroma.Web.AdminAPI.AccountView alias Pleroma.Web.CommonAPI + alias Pleroma.Workers.PollWorker import Pleroma.Factory import Mock @@ -48,6 +49,12 @@ test "it posts a poll" do assert object.data["type"] == "Question" assert object.data["oneOf"] |> length() == 2 + + assert_enqueued( + worker: PollWorker, + args: %{op: "poll_end", activity_id: activity.id}, + scheduled_at: NaiveDateTime.from_iso8601!(object.data["closed"]) + ) end end diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs index d478a81ee..ed66d370a 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -16,6 +16,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.CommonAPI + alias Pleroma.Workers.ScheduledActivityWorker import Pleroma.Factory @@ -705,11 +706,11 @@ test "scheduled poll", %{conn: conn} do |> json_response_and_validate_schema(200) assert {:ok, %{id: activity_id}} = - perform_job(Pleroma.Workers.ScheduledActivityWorker, %{ + perform_job(ScheduledActivityWorker, %{ activity_id: scheduled_id }) - assert Repo.all(Oban.Job) == [] + refute_enqueued(worker: ScheduledActivityWorker) object = Activity diff --git a/test/pleroma/web/mastodon_api/views/notification_view_test.exs b/test/pleroma/web/mastodon_api/views/notification_view_test.exs index 496a688d1..8070c03c9 100644 --- a/test/pleroma/web/mastodon_api/views/notification_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/notification_view_test.exs @@ -196,6 +196,27 @@ test "EmojiReact notification" do test_notifications_rendering([notification], user, [expected]) end + test "Poll notification" do + user = insert(:user) + activity = insert(:question_activity, user: user) + {:ok, [notification]} = Notification.create_poll_notifications(activity) + + expected = %{ + id: to_string(notification.id), + pleroma: %{is_seen: false, is_muted: false}, + type: "poll", + account: + AccountView.render("show.json", %{ + user: user, + for: user + }), + status: StatusView.render("show.json", %{activity: activity, for: user}), + created_at: Utils.to_masto_date(notification.inserted_at) + } + + test_notifications_rendering([notification], user, [expected]) + end + test "Report notification" do reporting_user = insert(:user) reported_user = insert(:user) diff --git a/test/pleroma/web/node_info_test.exs b/test/pleroma/web/node_info_test.exs index ee6fdaae8..9deceb1b5 100644 --- a/test/pleroma/web/node_info_test.exs +++ b/test/pleroma/web/node_info_test.exs @@ -150,37 +150,127 @@ test "it shows default features flags", %{conn: conn} do ) end - test "it shows MRF transparency data if enabled", %{conn: conn} do - clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.SimplePolicy]) - clear_config([:mrf, :transparency], true) + describe "Quarantined instances" do + setup do + clear_config([:mrf, :transparency], true) + quarantined_instances = [{"example.com", "reason to quarantine"}] + clear_config([:instance, :quarantined_instances], quarantined_instances) + end - simple_config = %{"reject" => ["example.com"]} - clear_config(:mrf_simple, simple_config) + test "shows quarantined instances data if enabled", %{conn: conn} do + expected_config = ["example.com"] - response = - conn - |> get("/nodeinfo/2.1.json") - |> json_response(:ok) + response = + conn + |> get("/nodeinfo/2.1.json") + |> json_response(:ok) - assert response["metadata"]["federation"]["mrf_simple"] == simple_config + assert response["metadata"]["federation"]["quarantined_instances"] == expected_config + end + + test "shows extra information in the quarantined_info field for relevant entries", %{ + conn: conn + } do + clear_config([:mrf, :transparency], true) + + expected_config = %{ + "quarantined_instances" => %{ + "example.com" => %{"reason" => "reason to quarantine"} + } + } + + response = + conn + |> get("/nodeinfo/2.1.json") + |> json_response(:ok) + + assert response["metadata"]["federation"]["quarantined_instances_info"] == expected_config + end end - test "it performs exclusions from MRF transparency data if configured", %{conn: conn} do - clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.SimplePolicy]) - clear_config([:mrf, :transparency], true) - clear_config([:mrf, :transparency_exclusions], ["other.site"]) + describe "MRF SimplePolicy" do + setup do + clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.SimplePolicy]) + clear_config([:mrf, :transparency], true) + end - simple_config = %{"reject" => ["example.com", "other.site"]} - clear_config(:mrf_simple, simple_config) + test "shows MRF transparency data if enabled", %{conn: conn} do + simple_config = %{"reject" => [{"example.com", ""}]} + clear_config(:mrf_simple, simple_config) - expected_config = %{"reject" => ["example.com"]} + expected_config = %{"reject" => ["example.com"]} - response = - conn - |> get("/nodeinfo/2.1.json") - |> json_response(:ok) + response = + conn + |> get("/nodeinfo/2.1.json") + |> json_response(:ok) - assert response["metadata"]["federation"]["mrf_simple"] == expected_config - assert response["metadata"]["federation"]["exclusions"] == true + assert response["metadata"]["federation"]["mrf_simple"] == expected_config + end + + test "performs exclusions from MRF transparency data if configured", %{conn: conn} do + clear_config([:mrf, :transparency_exclusions], [ + {"other.site", "We don't want them to know"} + ]) + + simple_config = %{"reject" => [{"example.com", ""}, {"other.site", ""}]} + clear_config(:mrf_simple, simple_config) + + expected_config = %{"reject" => ["example.com"]} + + response = + conn + |> get("/nodeinfo/2.1.json") + |> json_response(:ok) + + assert response["metadata"]["federation"]["mrf_simple"] == expected_config + assert response["metadata"]["federation"]["exclusions"] == true + end + + test "shows extra information in the mrf_simple_info field for relevant entries", %{ + conn: conn + } do + simple_config = %{ + media_removal: [{"no.media", "LEEWWWDD >//<"}], + media_nsfw: [], + federated_timeline_removal: [{"no.ftl", ""}], + report_removal: [], + reject: [ + {"example.instance", "Some reason"}, + {"uwu.owo", "awoo to much"}, + {"no.reason", ""} + ], + followers_only: [], + accept: [], + avatar_removal: [], + banner_removal: [], + reject_deletes: [ + {"peak.me", "I want to peak at what they don't want me to see, eheh"} + ] + } + + clear_config(:mrf_simple, simple_config) + + clear_config([:mrf, :transparency_exclusions], [ + {"peak.me", "I don't want them to know"} + ]) + + expected_config = %{ + "media_removal" => %{ + "no.media" => %{"reason" => "LEEWWWDD >//<"} + }, + "reject" => %{ + "example.instance" => %{"reason" => "Some reason"}, + "uwu.owo" => %{"reason" => "awoo to much"} + } + } + + response = + conn + |> get("/nodeinfo/2.1.json") + |> json_response(:ok) + + assert response["metadata"]["federation"]["mrf_simple_info"] == expected_config + end end end diff --git a/test/pleroma/web/twitter_api/util_controller_test.exs b/test/pleroma/web/twitter_api/util_controller_test.exs index cc17940b5..f030483d8 100644 --- a/test/pleroma/web/twitter_api/util_controller_test.exs +++ b/test/pleroma/web/twitter_api/util_controller_test.exs @@ -261,11 +261,8 @@ test "without permissions", %{conn: conn} do conn = conn |> assign(:token, nil) - |> post( - "/api/pleroma/change_email?#{ - URI.encode_query(%{password: "hi", email: "test@test.com"}) - }" - ) + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "hi", email: "test@test.com"}) assert json_response_and_validate_schema(conn, 403) == %{ "error" => "Insufficient permissions: write:accounts." @@ -274,12 +271,9 @@ test "without permissions", %{conn: conn} do test "with proper permissions and invalid password", %{conn: conn} do conn = - post( - conn, - "/api/pleroma/change_email?#{ - URI.encode_query(%{password: "hi", email: "test@test.com"}) - }" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "hi", email: "test@test.com"}) assert json_response_and_validate_schema(conn, 200) == %{"error" => "Invalid password."} end @@ -288,10 +282,9 @@ test "with proper permissions, valid password and invalid email", %{ conn: conn } do conn = - post( - conn, - "/api/pleroma/change_email?#{URI.encode_query(%{password: "test", email: "foobar"})}" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "test", email: "foobar"}) assert json_response_and_validate_schema(conn, 200) == %{ "error" => "Email has invalid format." @@ -301,7 +294,10 @@ test "with proper permissions, valid password and invalid email", %{ test "with proper permissions, valid password and no email", %{ conn: conn } do - conn = post(conn, "/api/pleroma/change_email?#{URI.encode_query(%{password: "test"})}") + conn = + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "test"}) assert %{"error" => "Missing field: email."} = json_response_and_validate_schema(conn, 400) end @@ -310,10 +306,9 @@ test "with proper permissions, valid password and blank email", %{ conn: conn } do conn = - post( - conn, - "/api/pleroma/change_email?#{URI.encode_query(%{password: "test", email: ""})}" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "test", email: ""}) assert json_response_and_validate_schema(conn, 200) == %{"error" => "Email can't be blank."} end @@ -324,10 +319,9 @@ test "with proper permissions, valid password and non unique email", %{ user = insert(:user) conn = - post( - conn, - "/api/pleroma/change_email?#{URI.encode_query(%{password: "test", email: user.email})}" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "test", email: user.email}) assert json_response_and_validate_schema(conn, 200) == %{ "error" => "Email has already been taken." @@ -338,12 +332,9 @@ test "with proper permissions, valid password and valid email", %{ conn: conn } do conn = - post( - conn, - "/api/pleroma/change_email?#{ - URI.encode_query(%{password: "test", email: "cofe@foobar.com"}) - }" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_email", %{password: "test", email: "cofe@foobar.com"}) assert json_response_and_validate_schema(conn, 200) == %{"status" => "success"} end @@ -356,15 +347,12 @@ test "without permissions", %{conn: conn} do conn = conn |> assign(:token, nil) - |> post( - "/api/pleroma/change_password?#{ - URI.encode_query(%{ - password: "hi", - new_password: "newpass", - new_password_confirmation: "newpass" - }) - }" - ) + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_password", %{ + "password" => "hi", + "new_password" => "newpass", + "new_password_confirmation" => "newpass" + }) assert json_response_and_validate_schema(conn, 403) == %{ "error" => "Insufficient permissions: write:accounts." @@ -373,16 +361,13 @@ test "without permissions", %{conn: conn} do test "with proper permissions and invalid password", %{conn: conn} do conn = - post( - conn, - "/api/pleroma/change_password?#{ - URI.encode_query(%{ - password: "hi", - new_password: "newpass", - new_password_confirmation: "newpass" - }) - }" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_password", %{ + "password" => "hi", + "new_password" => "newpass", + "new_password_confirmation" => "newpass" + }) assert json_response_and_validate_schema(conn, 200) == %{"error" => "Invalid password."} end @@ -392,16 +377,13 @@ test "with proper permissions, valid password and new password and confirmation conn: conn } do conn = - post( - conn, - "/api/pleroma/change_password?#{ - URI.encode_query(%{ - password: "test", - new_password: "newpass", - new_password_confirmation: "notnewpass" - }) - }" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_password", %{ + "password" => "test", + "new_password" => "newpass", + "new_password_confirmation" => "notnewpass" + }) assert json_response_and_validate_schema(conn, 200) == %{ "error" => "New password does not match confirmation." @@ -412,12 +394,13 @@ test "with proper permissions, valid password and invalid new password", %{ conn: conn } do conn = - post( - conn, - "/api/pleroma/change_password?#{ - URI.encode_query(%{password: "test", new_password: "", new_password_confirmation: ""}) - }" - ) + conn + |> put_req_header("content-type", "multipart/form-data") + |> post("/api/pleroma/change_password", %{ + password: "test", + new_password: "", + new_password_confirmation: "" + }) assert json_response_and_validate_schema(conn, 200) == %{ "error" => "New password can't be blank." @@ -429,15 +412,15 @@ test "with proper permissions, valid password and matching new password and conf user: user } do conn = - post( - conn, - "/api/pleroma/change_password?#{ - URI.encode_query(%{ - password: "test", - new_password: "newpass", - new_password_confirmation: "newpass" - }) - }" + conn + |> put_req_header("content-type", "multipart/form-data") + |> post( + "/api/pleroma/change_password", + %{ + password: "test", + new_password: "newpass", + new_password_confirmation: "newpass" + } ) assert json_response_and_validate_schema(conn, 200) == %{"status" => "success"} diff --git a/test/support/factory.ex b/test/support/factory.ex index c267dba4e..4a78425ce 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -142,6 +142,11 @@ defp attachment_data(ap_id, href) do } end + def followers_only_note_factory(attrs \\ %{}) do + %Pleroma.Object{data: data} = note_factory(attrs) + %Pleroma.Object{data: Map.merge(data, %{"to" => [data["actor"] <> "/followers"]})} + end + def audio_factory(attrs \\ %{}) do text = sequence(:text, &"lain radio episode #{&1}") @@ -208,6 +213,38 @@ def tombstone_factory do } end + def question_factory(attrs \\ %{}) do + user = attrs[:user] || insert(:user) + + data = %{ + "id" => Pleroma.Web.ActivityPub.Utils.generate_object_id(), + "type" => "Question", + "actor" => user.ap_id, + "attributedTo" => user.ap_id, + "attachment" => [], + "to" => ["https://www.w3.org/ns/activitystreams#Public"], + "cc" => [user.follower_address], + "context" => Pleroma.Web.ActivityPub.Utils.generate_context_id(), + "closed" => DateTime.utc_now() |> DateTime.add(86_400) |> DateTime.to_iso8601(), + "oneOf" => [ + %{ + "type" => "Note", + "name" => "chocolate", + "replies" => %{"totalItems" => 0, "type" => "Collection"} + }, + %{ + "type" => "Note", + "name" => "vanilla", + "replies" => %{"totalItems" => 0, "type" => "Collection"} + } + ] + } + + %Pleroma.Object{ + data: merge_attributes(data, Map.get(attrs, :data, %{})) + } + end + def direct_note_activity_factory do dm = insert(:direct_note) @@ -267,6 +304,33 @@ defp featured_collection_activity(attrs, type) do |> Map.merge(attrs) end + def followers_only_note_activity_factory(attrs \\ %{}) do + user = attrs[:user] || insert(:user) + note = insert(:followers_only_note, user: user) + + data_attrs = attrs[:data_attrs] || %{} + attrs = Map.drop(attrs, [:user, :note, :data_attrs]) + + data = + %{ + "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(), + "type" => "Create", + "actor" => note.data["actor"], + "to" => note.data["to"], + "object" => note.data, + "published" => DateTime.utc_now() |> DateTime.to_iso8601(), + "context" => note.data["context"] + } + |> Map.merge(data_attrs) + + %Pleroma.Activity{ + data: data, + actor: data["actor"], + recipients: data["to"] + } + |> Map.merge(attrs) + end + def note_activity_factory(attrs \\ %{}) do user = attrs[:user] || insert(:user) note = attrs[:note] || insert(:note, user: user) @@ -396,6 +460,33 @@ def report_activity_factory(attrs \\ %{}) do } end + def question_activity_factory(attrs \\ %{}) do + user = attrs[:user] || insert(:user) + question = attrs[:question] || insert(:question, user: user) + + data_attrs = attrs[:data_attrs] || %{} + attrs = Map.drop(attrs, [:user, :question, :data_attrs]) + + data = + %{ + "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id(), + "type" => "Create", + "actor" => question.data["actor"], + "to" => question.data["to"], + "object" => question.data["id"], + "published" => DateTime.utc_now() |> DateTime.to_iso8601(), + "context" => question.data["context"] + } + |> Map.merge(data_attrs) + + %Pleroma.Activity{ + data: data, + actor: data["actor"], + recipients: data["to"] + } + |> Map.merge(attrs) + end + def oauth_app_factory do %Pleroma.Web.OAuth.App{ client_name: sequence(:client_name, &"Some client #{&1}"),