diff --git a/.gitignore b/.gitignore
index 198e80139..599b52b9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
/*.ez
/test/uploads
/.elixir_ls
+/test/fixtures/DSCN0010_tmp.jpg
/test/fixtures/test_tmp.txt
/test/fixtures/image_tmp.jpg
/test/tmp/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 685106969..29eb8d6b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: elixir:1.8.1
+image: elixir:1.9.4
variables: &global_variables
POSTGRES_DB: pleroma_test
@@ -22,6 +22,7 @@ stages:
- docker
before_script:
+ - apt-get update && apt-get install -y cmake
- mix local.hex --force
- mix local.rebar --force
- apt-get -qq update
@@ -60,6 +61,7 @@ unit-testing:
alias: postgres
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
script:
+ - apt-get update && apt-get install -y libimage-exiftool-perl
- mix deps.get
- mix ecto.create
- mix ecto.migrate
@@ -93,6 +95,7 @@ unit-testing-rum:
<<: *global_variables
RUM_ENABLED: "true"
script:
+ - apt-get update && apt-get install -y libimage-exiftool-perl
- mix deps.get
- mix ecto.create
- mix ecto.migrate
@@ -172,8 +175,7 @@ stop_review_app:
amd64:
stage: release
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0
+ image: elixir:1.10.3
only: &release-only
- stable@pleroma/pleroma
- develop@pleroma/pleroma
@@ -196,6 +198,7 @@ amd64:
variables: &release-variables
MIX_ENV: prod
before_script: &before-release
+ - apt-get update && apt-get install -y cmake
- echo "import Mix.Config" > config/prod.secret.exs
- mix local.hex --force
- mix local.rebar --force
@@ -210,12 +213,11 @@ amd64-musl:
stage: release
artifacts: *release-artifacts
only: *release-only
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0-alpine
+ image: elixir:1.10.3-alpine
cache: *release-cache
variables: *release-variables
before_script: &before-release-musl
- - apk add git gcc g++ musl-dev make
+ - apk add git gcc g++ musl-dev make cmake
- echo "import Mix.Config" > config/prod.secret.exs
- mix local.hex --force
- mix local.rebar --force
@@ -227,8 +229,7 @@ arm:
only: *release-only
tags:
- arm32
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0-arm
+ image: elixir:1.10.3
cache: *release-cache
variables: *release-variables
before_script: *before-release
@@ -240,8 +241,7 @@ arm-musl:
only: *release-only
tags:
- arm32
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
+ image: elixir:1.10.3-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
@@ -253,8 +253,7 @@ arm64:
only: *release-only
tags:
- arm
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0-arm64
+ image: elixir:1.10.3
cache: *release-cache
variables: *release-variables
before_script: *before-release
@@ -267,7 +266,7 @@ arm64-musl:
tags:
- arm
# TODO: Replace with upstream image when 1.9.0 comes out
- image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
+ image: elixir:1.10.3-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
@@ -285,6 +284,8 @@ docker:
IMAGE_TAG_SLUG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
IMAGE_TAG_LATEST_STABLE: $CI_REGISTRY_IMAGE:latest-stable
+ DOCKER_BUILDX_URL: https://github.com/docker/buildx/releases/download/v0.4.1/buildx-v0.4.1.linux-amd64
+ DOCKER_BUILDX_HASH: 71a7d01439aa8c165a25b59c44d3f016fddbd98b
before_script: &before-docker
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $IMAGE_TAG_SLUG || true
@@ -292,10 +293,14 @@ docker:
- export CI_VCS_REF=$CI_COMMIT_SHORT_SHA
allow_failure: true
script:
- - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
- - docker push $IMAGE_TAG
- - docker push $IMAGE_TAG_SLUG
- - docker push $IMAGE_TAG_LATEST
+ - mkdir -p /root/.docker/cli-plugins
+ - wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
+ - echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
+ - chmod +x ~/.docker/cli-plugins/docker-buildx
+ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
+ - docker buildx create --name mbuilder --driver docker-container --use
+ - docker buildx inspect --bootstrap
+ - docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
tags:
- dind
only:
@@ -310,10 +315,14 @@ docker-stable:
before_script: *before-docker
allow_failure: true
script:
- - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
- - docker push $IMAGE_TAG
- - docker push $IMAGE_TAG_SLUG
- - docker push $IMAGE_TAG_LATEST_STABLE
+ - mkdir -p /root/.docker/cli-plugins
+ - wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
+ - echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
+ - chmod +x ~/.docker/cli-plugins/docker-buildx
+ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
+ - docker buildx create --name mbuilder --driver docker-container --use
+ - docker buildx inspect --bootstrap
+ - docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
tags:
- dind
only:
@@ -328,9 +337,15 @@ docker-release:
before_script: *before-docker
allow_failure: true
script:
- - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
- - docker push $IMAGE_TAG
- - docker push $IMAGE_TAG_SLUG
+ script:
+ - mkdir -p /root/.docker/cli-plugins
+ - wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
+ - echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
+ - chmod +x ~/.docker/cli-plugins/docker-buildx
+ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
+ - docker buildx create --name mbuilder --driver docker-container --use
+ - docker buildx inspect --bootstrap
+ - docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
tags:
- dind
only:
diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md
index 66fbc510e..dd0d6eb24 100644
--- a/.gitlab/issue_templates/Bug.md
+++ b/.gitlab/issue_templates/Bug.md
@@ -8,13 +8,11 @@
### Environment
-* Installation type:
- - [ ] OTP
- - [ ] From source
+* Installation type (OTP or From Source):
* Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE):
* Elixir version (`elixir -v` for from source installations, N/A for OTP):
* Operating system:
-* PostgreSQL version (`postgres -V`):
+* PostgreSQL version (`psql -V`):
### Bug description
diff --git a/.gitlab/merge_request_templates/Release.md b/.gitlab/merge_request_templates/Release.md
index 237f74e00..b2c772696 100644
--- a/.gitlab/merge_request_templates/Release.md
+++ b/.gitlab/merge_request_templates/Release.md
@@ -3,3 +3,4 @@
* [ ] Compile a changelog
* [ ] Create an MR with an announcement to pleroma.social
* [ ] Tag the release
+* [ ] Merge `stable` into `develop` (in case the fixes are already in develop, use `git merge -s ours --no-commit` and manually merge the changelogs)
diff --git a/CC-BY-4.0 b/CC-BY-4.0
new file mode 100644
index 000000000..4ea99c213
--- /dev/null
+++ b/CC-BY-4.0
@@ -0,0 +1,395 @@
+Attribution 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8925f31f6..a5c75bd4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,21 +3,105 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
-## [unreleased]
+## Unreleased
### Changed
+
+- **Breaking** Requires `libmagic` (or `file`) to guess file types.
+- Renamed `:await_up_timeout` in `:connections_pool` namespace to `:connect_timeout`, old name is deprecated.
+- Renamed `:timeout` in `pools` namespace to `:recv_timeout`, old name is deprecated.
+
+### Removed
+
+- **Breaking:** `Pleroma.Workers.Cron.StatsWorker` setting from Oban `:crontab` (moved to a simpler implementation).
+- **Breaking:** `Pleroma.Workers.Cron.ClearOauthTokenWorker` setting from Oban `:crontab` (moved to scheduled jobs).
+- **Breaking:** `Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker` setting from Oban `:crontab` (moved to scheduled jobs).
+
+### Changed
+- Minimum lifetime for ephmeral activities changed to 10 minutes and made configurable (`:min_lifetime` option).
+
+## [2.1.1] - 2020-09-08
+
+### Security
+- Fix possible DoS in Mastodon API user search due to an error in match clauses, leading to an infinite recursion and subsequent OOM with certain inputs.
+- Fix metadata leak for accounts and statuses on private instances.
+- Fix possible DoS in Admin API search using an atom leak vulnerability. Authentication with admin rights was required to exploit.
+
+### Changed
+
+- **Breaking:** The metadata providers RelMe and Feed are no longer configurable. RelMe should always be activated and Feed only provides a header tag for the actual RSS/Atom feed when the instance is public.
+- Improved error message when cmake is not available at build stage.
+
+### Added
+- Rich media failure tracking (along with `:failure_backoff` option).
+
+### Fixed
+- Default HTTP adapter not respecting pool setting, leading to possible OOM.
+- Fixed uploading webp images when the Exiftool Upload Filter is enabled by skipping them
+- Mastodon API: Search parameter `following` now correctly returns the followings rather than the followers
+- Mastodon API: Timelines hanging for (`number of posts with links * rich media timeout`) in the worst case.
+ Reduced to just rich media timeout.
+- Mastodon API: Cards being wrong for preview statuses due to cache key collision.
+- Password resets no longer processed for deactivated accounts.
+- Favicon scraper raising exceptions on URLs longer than 255 characters.
+
+## [2.1.0] - 2020-08-28
+
+### Changed
+
+- **Breaking:** The default descriptions on uploads are now empty. The old behavior (filename as default) can be configured, see the cheat sheet.
+- **Breaking:** Added the ObjectAgePolicy to the default set of MRFs. This will delist and strip the follower collection of any message received that is older than 7 days. This will stop users from seeing very old messages in the timelines. The messages can still be viewed on the user's page and in conversations. They also still trigger notifications.
+- **Breaking:** Elixir >=1.9 is now required (was >= 1.8)
+- **Breaking:** Configuration: `:auto_linker, :opts` moved to `:pleroma, Pleroma.Formatter`. Old config namespace is deprecated.
+- **Breaking:** Configuration: `:instance, welcome_user_nickname` moved to `:welcome, :direct_message, :sender_nickname`, `:instance, :welcome_message` moved to `:welcome, :direct_message, :message`. Old config namespace is deprecated.
+- **Breaking:** LDAP: Fallback to local database authentication has been removed for security reasons and lack of a mechanism to ensure the passwords are synchronized when LDAP passwords are updated.
+- **Breaking** Changed defaults for `:restrict_unauthenticated` so that when `:instance, :public` is set to `false` then all `:restrict_unauthenticated` items be effectively set to `true`. If you'd like to allow unauthenticated access to specific API endpoints on a private instance, please explicitly set `:restrict_unauthenticated` to non-default value in `config/prod.secret.exs`.
+- In Conversations, return only direct messages as `last_status`
+- Using the `only_media` filter on timelines will now exclude reblog media
- MFR policy to set global expiration for all local Create activities
- OGP rich media parser merged with TwitterCard
-- **Breaking** Requires `libmagic` (or `file`) to guess file types.
+- Configuration: `:instance, rewrite_policy` moved to `:mrf, policies`, `:instance, :mrf_transparency` moved to `:mrf, :transparency`, `:instance, :mrf_transparency_exclusions` moved to `:mrf, :transparency_exclusions`. Old config namespace is deprecated.
+- Configuration: `:media_proxy, whitelist` format changed to host with scheme (e.g. `http://example.com` instead of `example.com`). Domain format is deprecated.
+
API Changes
+
+- **Breaking:** Pleroma API: The routes to update avatar, banner and background have been removed.
+- **Breaking:** Image description length is limited now.
- **Breaking:** Emoji API: changed methods and renamed routes.
+- **Breaking:** Notification Settings API for suppressing notifications has been simplified down to `block_from_strangers`.
+- **Breaking:** Notification Settings API option for hiding push notification contents has been renamed to `hide_notification_contents`.
+- MastodonAPI: Allow removal of avatar, banner and background.
+- Streaming: Repeats of a user's posts will no longer be pushed to the user's stream.
+- Mastodon API: Added `pleroma.metadata.fields_limits` to /api/v1/instance
+- Mastodon API: On deletion, returns the original post text.
+- Mastodon API: Add `pleroma.unread_count` to the Marker entity.
+- Mastodon API: Added `pleroma.metadata.post_formats` to /api/v1/instance
+- Mastodon API (legacy): Allow query parameters for `/api/v1/domain_blocks`, e.g. `/api/v1/domain_blocks?domain=badposters.zone`
+- Mastodon API: Make notifications about statuses from muted users and threads read automatically
+- Pleroma API: `/api/pleroma/captcha` responses now include `seconds_valid` with an integer value.
+
+
+
+
+ Admin API Changes
+
+- **Breaking** Changed relay `/api/pleroma/admin/relay` endpoints response format.
+- Status visibility stats: now can return stats per instance.
+- Mix task to refresh counter cache (`mix pleroma.refresh_counter_cache`)
+
### Removed
+
- **Breaking:** removed `with_move` parameter from notifications timeline.
### Added
+
+- Frontends: Add mix task to install frontends.
+- Frontends: Add configurable frontends for primary and admin fe.
+- Configuration: Added a blacklist for email servers.
+- Chats: Added `accepts_chat_messages` field to user, exposed in APIs and federation.
- Chats: Added support for federated chats. For details, see the docs.
- ActivityPub: Added support for existing AP ids for instances migrated from Mastodon.
- Instance: Add `background_image` to configuration and `/api/v1/instance`
@@ -33,18 +117,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Notifications: Added `follow_request` notification type.
- Added `:reject_deletes` group to SimplePolicy
- MRF (`EmojiStealPolicy`): New MRF Policy which allows to automatically download emojis from remote instances
+- Support pagination in emoji packs API (for packs and for files in pack)
+- Support for viewing instances favicons next to posts and accounts
+- Added Pleroma.Upload.Filter.Exiftool as an alternate EXIF stripping mechanism targeting GPS/location metadata.
+- "By approval" registrations mode.
+- Configuration: Added `:welcome` settings for the welcome message to newly registered users. You can send a welcome message as a direct message, chat or email.
+- Ability to hide favourites and emoji reactions in the API with `[:instance, :show_reactions]` config.
+
API Changes
+
+- Mastodon API: Add pleroma.parent_visible field to statuses.
- Mastodon API: Extended `/api/v1/instance`.
- Mastodon API: Support for `include_types` in `/api/v1/notifications`.
- Mastodon API: Added `/api/v1/notifications/:id/dismiss` endpoint.
-- Mastodon API: Add support for filtering replies in public and home timelines
+- Mastodon API: Add support for filtering replies in public and home timelines.
+- Mastodon API: Support for `bot` field in `/api/v1/accounts/update_credentials`.
+- Mastodon API: Support irreversible property for filters.
+- Mastodon API: Add pleroma.favicon field to accounts.
- Admin API: endpoints for create/update/delete OAuth Apps.
- Admin API: endpoint for status view.
- OTP: Add command to reload emoji packs
### Fixed
+- Fix list pagination and other list issues.
- Support pagination in conversations API
- **Breaking**: SimplePolicy `:reject` and `:accept` allow deletions again
- Fix follower/blocks import when nicknames starts with @
@@ -52,12 +149,87 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Resolving Peertube accounts with Webfinger
- `blob:` urls not being allowed by connect-src CSP
- Mastodon API: fix `GET /api/v1/notifications` not returning the full result set
+- Rich Media Previews for Twitter links
+- Admin API: fix `GET /api/pleroma/admin/users/:nickname/credentials` returning 404 when getting the credentials of a remote user while `:instance, :limit_to_local_content` is set to `:unauthenticated`
+- Fix CSP policy generation to include remote Captcha services
+- Fix edge case where MediaProxy truncates media, usually caused when Caddy is serving content for the other Federated instance.
+- Emoji Packs could not be listed when instance was set to `public: false`
+- Fix whole_word always returning false on filter get requests
+- Migrations not working on OTP releases if the database was connected over ssl
+- Fix relay following
-## [Unreleased (patch)]
+## [2.0.7] - 2020-06-13
+
+### Security
+- Fix potential DoSes exploiting atom leaks in rich media parser and the `UserAllowListPolicy` MRF policy
### Fixed
+- CSP: not allowing images/media from every host when mediaproxy is disabled
+- CSP: not adding mediaproxy base url to image/media hosts
+- StaticFE missing the CSS file
+
+### Upgrade notes
+
+1. Restart Pleroma
+
+## [2.0.6] - 2020-06-09
+
+### Security
+- CSP: harden `image-src` and `media-src` when MediaProxy is used
+
+### Fixed
+- AP C2S: Fix pagination in inbox/outbox
+- Various compilation errors on OTP 23
+- Mastodon API streaming: Repeats from muted threads not being filtered
+
+### Changed
+- Various database performance improvements
+
+### Upgrade notes
+1. Run database migrations (inside Pleroma directory):
+ - OTP: `./bin/pleroma_ctl migrate`
+ - From Source: `mix ecto.migrate`
+2. Restart Pleroma
+
+## [2.0.5] - 2020-05-13
+
+### Security
+- Fix possible private status leaks in Mastodon Streaming API
+
+### Fixed
+- Crashes when trying to block a user if block federation is disabled
+- Not being able to start the instance without `erlang-eldap` installed
+- Users with bios over the limit getting rejected
+- Follower counters not being updated on incoming follow accepts
+
+### Upgrade notes
+
+1. Restart Pleroma
+
+## [2.0.4] - 2020-05-10
+
+### Security
+- AP C2S: Fix a potential DoS by creating nonsensical objects that break timelines
+
+### Fixed
+- Peertube user lookups not working
+- `InsertSkeletonsForDeletedUsers` migration failing on some instances
- Healthcheck reporting the number of memory currently used, rather than allocated in total
-- `InsertSkeletonsForDeletedUsers` failing on some instances
+- LDAP not being usable in OTP releases
+- Default apache configuration having tls chain issues
+
+### Upgrade notes
+
+#### Apache only
+
+1. Remove the following line from your config:
+```
+ SSLCertificateFile /etc/letsencrypt/live/${servername}/cert.pem
+```
+
+#### Everyone
+
+1. Restart Pleroma
## [2.0.3] - 2020-05-02
@@ -90,6 +262,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2. Run database migrations (inside Pleroma directory):
- OTP: `./bin/pleroma_ctl migrate`
- From Source: `mix ecto.migrate`
+3. Reset status visibility counters (inside Pleroma directory):
+ - OTP: `./bin/pleroma_ctl refresh_counter_cache`
+ - From Source: `mix pleroma.refresh_counter_cache`
## [2.0.2] - 2020-04-08
@@ -112,6 +287,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Static-FE: Fix remote posts not being sanitized
### Fixed
+=======
+- Rate limiter crashes when there is no explicitly specified ip in the config
- 500 errors when no `Accept` header is present if Static-FE is enabled
- Instance panel not being updated immediately due to wrong `Cache-Control` headers
- Statuses posted with BBCode/Markdown having unncessary newlines in Pleroma-FE
@@ -145,6 +322,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **Breaking**: Using third party engines for user recommendation
API Changes
+
- **Breaking**: AdminAPI: migrate_from_db endpoint
@@ -190,7 +368,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Mastodon API: `pleroma.thread_muted` to the Status entity
- Mastodon API: Mark the direct conversation as read for the author when they send a new direct message
- Mastodon API, streaming: Add `pleroma.direct_conversation_id` to the `conversation` stream event payload.
-- Mastodon API: Add `pleroma.unread_count` to the Marker entity
- Admin API: Render whole status in grouped reports
- Mastodon API: User timelines will now respect blocks, unless you are getting the user timeline of somebody you blocked (which would be empty otherwise).
- Mastodon API: Favoriting / Repeating a post multiple times will now return the identical response every time. Before, executing that action twice would return an error ("already favorited") on the second try.
diff --git a/Dockerfile b/Dockerfile
index 29931a5e3..c210cf79c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ COPY . .
ENV MIX_ENV=prod
-RUN apk add git gcc g++ musl-dev make &&\
+RUN apk add git gcc g++ musl-dev make cmake &&\
echo "import Mix.Config" > config/prod.secret.exs &&\
mix local.hex --force &&\
mix local.rebar --force &&\
@@ -31,9 +31,9 @@ LABEL maintainer="ops@pleroma.social" \
ARG HOME=/opt/pleroma
ARG DATA=/var/lib/pleroma
-RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
+RUN echo "https://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
apk update &&\
- apk add imagemagick ncurses postgresql-client &&\
+ apk add exiftool imagemagick ncurses postgresql-client &&\
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
mkdir -p ${DATA}/uploads &&\
mkdir -p ${DATA}/static &&\
diff --git a/README.md b/README.md
index 7fc1fd381..6ca3118fb 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,16 @@ Currently Pleroma is not packaged by any OS/Distros, but if you want to package
### Docker
While we don’t provide docker files, other people have written very good ones. Take a look at or .
+### Compilation Troubleshooting
+If you ever encounter compilation issues during the updating of Pleroma, you can try these commands and see if they fix things:
+
+- `mix deps.clean --all`
+- `mix local.rebar`
+- `mix local.hex`
+- `rm -r _build`
+
+If you are not developing Pleroma, it is better to use the OTP release, which comes with everything precompiled.
+
## Documentation
- Latest Released revision:
- Latest Git revision:
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000..8617c1434
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,16 @@
+# Pleroma backend security policy
+
+## Supported versions
+
+Currently, Pleroma offers bugfixes and security patches only for the latest minor release.
+
+| Version | Support
+|---------| --------
+| 2.1 | Bugfixes and security patches
+
+## Reporting a vulnerability
+
+Please use confidential issues (tick the "This issue is confidential and should only be visible to team members with at least Reporter access." box when submitting) at our [bugtracker](https://git.pleroma.social/pleroma/pleroma/-/issues/new) for reporting vulnerabilities.
+## Announcements
+
+New releases are announced at [pleroma.social](https://pleroma.social/announcements/). All security releases are tagged with ["Security"](https://pleroma.social/announcements/tags/security/). You can be notified of them by subscribing to an Atom feed at .
diff --git a/benchmarks/load_testing/activities.ex b/benchmarks/load_testing/activities.ex
index 074ded457..f5c7bfce8 100644
--- a/benchmarks/load_testing/activities.ex
+++ b/benchmarks/load_testing/activities.ex
@@ -24,6 +24,7 @@ defmodule Pleroma.LoadTesting.Activities do
@visibility ~w(public private direct unlisted)
@types [
:simple,
+ :simple_filtered,
:emoji,
:mentions,
:hell_thread,
@@ -242,6 +243,15 @@ defp insert_activity(:simple, visibility, group, users, _opts) do
insert_local_activity(visibility, group, users, "Simple status")
end
+ defp insert_activity(:simple_filtered, visibility, group, users, _opts)
+ when group in @remote_groups do
+ insert_remote_activity(visibility, group, users, "Remote status which must be filtered")
+ end
+
+ defp insert_activity(:simple_filtered, visibility, group, users, _opts) do
+ insert_local_activity(visibility, group, users, "Simple status which must be filtered")
+ end
+
defp insert_activity(:emoji, visibility, group, users, _opts)
when group in @remote_groups do
insert_remote_activity(visibility, group, users, "Remote status with emoji :firefox:")
diff --git a/benchmarks/load_testing/fetcher.ex b/benchmarks/load_testing/fetcher.ex
index 15fd06c3d..dfbd916be 100644
--- a/benchmarks/load_testing/fetcher.ex
+++ b/benchmarks/load_testing/fetcher.ex
@@ -32,10 +32,22 @@ defp fetch_user(user) do
)
end
+ defp create_filter(user) do
+ Pleroma.Filter.create(%Pleroma.Filter{
+ user_id: user.id,
+ phrase: "must be filtered",
+ hide: true
+ })
+ end
+
+ defp delete_filter(filter), do: Repo.delete(filter)
+
defp fetch_timelines(user) do
fetch_home_timeline(user)
+ fetch_home_timeline_with_filter(user)
fetch_direct_timeline(user)
fetch_public_timeline(user)
+ fetch_public_timeline_with_filter(user)
fetch_public_timeline(user, :with_blocks)
fetch_public_timeline(user, :local)
fetch_public_timeline(user, :tag)
@@ -61,7 +73,7 @@ defp opts_for_home_timeline(user) do
}
end
- defp fetch_home_timeline(user) do
+ defp fetch_home_timeline(user, title_end \\ "") do
opts = opts_for_home_timeline(user)
recipients = [user.ap_id | User.following(user)]
@@ -84,9 +96,11 @@ defp fetch_home_timeline(user) do
|> Enum.reverse()
|> List.last()
+ title = "home timeline " <> title_end
+
Benchee.run(
%{
- "home timeline" => fn opts -> ActivityPub.fetch_activities(recipients, opts) end
+ title => fn opts -> ActivityPub.fetch_activities(recipients, opts) end
},
inputs: %{
"1 page" => opts,
@@ -108,6 +122,14 @@ defp fetch_home_timeline(user) do
)
end
+ defp fetch_home_timeline_with_filter(user) do
+ {:ok, filter} = create_filter(user)
+
+ fetch_home_timeline(user, "with filters")
+
+ delete_filter(filter)
+ end
+
defp opts_for_direct_timeline(user) do
%{
visibility: "direct",
@@ -210,6 +232,14 @@ defp fetch_public_timeline(user) do
fetch_public_timeline(opts, "public timeline")
end
+ defp fetch_public_timeline_with_filter(user) do
+ {:ok, filter} = create_filter(user)
+ opts = opts_for_public_timeline(user)
+
+ fetch_public_timeline(opts, "public timeline with filters")
+ delete_filter(filter)
+ end
+
defp fetch_public_timeline(user, :local) do
opts = opts_for_public_timeline(user, :local)
diff --git a/config/config.exs b/config/config.exs
index f58b99faa..46a649b73 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -72,7 +72,8 @@
pool: :upload
]
],
- filename_display_max_length: 30
+ filename_display_max_length: 30,
+ default_description: nil
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
@@ -97,6 +98,7 @@
"dat",
"dweb",
"gopher",
+ "hyper",
"ipfs",
"ipns",
"irc",
@@ -186,7 +188,9 @@
notify_email: "noreply@example.com",
description: "Pleroma: An efficient and flexible fediverse server",
background_image: "/images/city.jpg",
+ instance_thumbnail: "/instance/thumbnail.jpeg",
limit: 5_000,
+ description_limit: 5_000,
chat_limit: 5_000,
remote_limit: 100_000,
upload_limit: 16_000_000,
@@ -202,6 +206,7 @@
registrations_open: true,
invites_enabled: false,
account_activation_required: false,
+ account_approval_required: false,
federating: true,
federation_incoming_replies_max_depth: 100,
federation_reachability_timeout_days: 7,
@@ -209,7 +214,6 @@
Pleroma.Web.ActivityPub.Publisher
],
allow_relay: true,
- rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
public: true,
quarantined_instances: [],
managed_config: true,
@@ -220,13 +224,9 @@
"text/markdown",
"text/bbcode"
],
- mrf_transparency: true,
- mrf_transparency_exclusions: [],
autofollowed_nicknames: [],
max_pinned_statuses: 1,
attachment_links: false,
- welcome_user_nickname: nil,
- welcome_message: nil,
max_report_comment_size: 1000,
safe_dm_mentions: false,
healthcheck: false,
@@ -239,6 +239,7 @@
max_remote_account_fields: 20,
account_field_name_length: 512,
account_field_value_length: 2048,
+ registration_reason_length: 500,
external_user_synchronization: true,
extended_nickname_format: true,
cleanup_attachments: false,
@@ -252,6 +253,26 @@
number: 5,
length: 16
]
+ ],
+ show_reactions: true
+
+config :pleroma, :welcome,
+ direct_message: [
+ enabled: false,
+ sender_nickname: nil,
+ message: nil
+ ],
+ chat_message: [
+ enabled: false,
+ sender_nickname: nil,
+ message: nil
+ ],
+ email: [
+ enabled: false,
+ sender: nil,
+ subject: "Welcome to <%= instance_name %>",
+ html: "Welcome to <%= instance_name %>",
+ text: "Welcome to <%= instance_name %>"
]
config :pleroma, :feed,
@@ -359,6 +380,7 @@
federated_timeline_removal: [],
report_removal: [],
reject: [],
+ followers_only: [],
accept: [],
avatar_removal: [],
banner_removal: [],
@@ -377,8 +399,9 @@
accept: [],
reject: []
+# threshold of 7 days
config :pleroma, :mrf_object_age,
- threshold: 172_800,
+ threshold: 604_800,
actions: [:delist, :strip_followers]
config :pleroma, :rich_media,
@@ -389,6 +412,7 @@
Pleroma.Web.RichMedia.Parsers.TwitterCard,
Pleroma.Web.RichMedia.Parsers.OEmbed
],
+ failure_backoff: 60_000,
ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
config :pleroma, :media_proxy,
@@ -407,6 +431,13 @@
],
whitelist: []
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
+ method: :purge,
+ headers: [],
+ options: []
+
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
+
config :pleroma, :chat, enabled: true
config :phoenix, :format_encoders, json: Jason
@@ -423,12 +454,15 @@
config :pleroma, Pleroma.Web.Metadata,
providers: [
Pleroma.Web.Metadata.Providers.OpenGraph,
- Pleroma.Web.Metadata.Providers.TwitterCard,
- Pleroma.Web.Metadata.Providers.RelMe,
- Pleroma.Web.Metadata.Providers.Feed
+ Pleroma.Web.Metadata.Providers.TwitterCard
],
unfurl_nsfw: false
+config :pleroma, Pleroma.Web.Preload,
+ providers: [
+ Pleroma.Web.Preload.Providers.Instance
+ ]
+
config :pleroma, :http_security,
enabled: true,
sts: false,
@@ -481,15 +515,22 @@
"user-search",
"user_exists",
"users",
- "web"
- ]
+ "web",
+ "verify_credentials",
+ "update_credentials",
+ "relationships",
+ "search",
+ "confirmation_resend",
+ "mfa"
+ ],
+ email_blacklist: []
config :pleroma, Oban,
repo: Pleroma.Repo,
- verbose: false,
- prune: {:maxlen, 1500},
+ log: false,
queues: [
activity_expiration: 10,
+ token_expiration: 5,
federator_incoming: 50,
federator_outgoing: 50,
web_push: 50,
@@ -501,10 +542,8 @@
attachments_cleanup: 5,
new_users_digest: 1
],
+ plugins: [Oban.Plugins.Pruner],
crontab: [
- {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
- {"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
- {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},
{"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
{"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
]
@@ -515,16 +554,14 @@
federator_outgoing: 5
]
-config :auto_linker,
- opts: [
- extra: true,
- # TODO: Set to :no_scheme when it works properly
- validate_tld: true,
- class: false,
- strip_prefix: false,
- new_window: false,
- rel: "ugc"
- ]
+config :pleroma, Pleroma.Formatter,
+ class: false,
+ rel: "ugc",
+ new_window: false,
+ truncate: false,
+ strip_prefix: false,
+ extra: true,
+ validate_tld: :no_scheme
config :pleroma, :ldap,
enabled: System.get_env("LDAP_ENABLED") == "true",
@@ -617,12 +654,65 @@
account_confirmation_resend: {8_640_000, 5},
ap_routes: {60_000, 15}
-config :pleroma, Pleroma.ActivityExpiration, enabled: true
+config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
config :pleroma, Pleroma.Plugs.RemoteIp, enabled: true
config :pleroma, :static_fe, enabled: false
+# Example of frontend configuration
+# This example will make us serve the primary frontend from the
+# frontends directory within your `:pleroma, :instance, static_dir`.
+# e.g., instance/static/frontends/pleroma/develop/
+#
+# With no frontend configuration, the bundled files from the `static` directory will
+# be used.
+#
+# config :pleroma, :frontends,
+# primary: %{"name" => "pleroma-fe", "ref" => "develop"},
+# admin: %{"name" => "admin-fe", "ref" => "stable"},
+# available: %{...}
+
+config :pleroma, :frontends,
+ available: %{
+ "kenoma" => %{
+ "name" => "kenoma",
+ "git" => "https://git.pleroma.social/lambadalambda/kenoma",
+ "build_url" =>
+ "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "master"
+ },
+ "pleroma-fe" => %{
+ "name" => "pleroma-fe",
+ "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "develop"
+ },
+ "fedi-fe" => %{
+ "name" => "fedi-fe",
+ "git" => "https://git.pleroma.social/pleroma/fedi-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "master"
+ },
+ "admin-fe" => %{
+ "name" => "admin-fe",
+ "git" => "https://git.pleroma.social/pleroma/admin-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "develop"
+ },
+ "soapbox-fe" => %{
+ "name" => "soapbox-fe",
+ "git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
+ "build_url" =>
+ "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
+ "ref" => "v1.0.0",
+ "build_dir" => "static"
+ }
+ }
+
config :pleroma, :web_cache_ttl,
activity_pub: nil,
activity_pub_question: 30_000
@@ -636,32 +726,34 @@
prepare: :unnamed
config :pleroma, :connections_pool,
- checkin_timeout: 250,
+ reclaim_multiplier: 0.1,
+ connection_acquisition_wait: 250,
+ connection_acquisition_retries: 5,
max_connections: 250,
- retry: 1,
- retry_timeout: 1000,
- await_up_timeout: 5_000
+ max_idle_time: 30_000,
+ retry: 0,
+ connect_timeout: 5_000
config :pleroma, :pools,
federation: [
size: 50,
- max_overflow: 10,
- timeout: 150_000
+ max_waiting: 10,
+ recv_timeout: 10_000
],
media: [
size: 50,
- max_overflow: 10,
- timeout: 150_000
+ max_waiting: 10,
+ recv_timeout: 10_000
],
upload: [
size: 25,
- max_overflow: 5,
- timeout: 300_000
+ max_waiting: 5,
+ recv_timeout: 15_000
],
default: [
size: 10,
- max_overflow: 2,
- timeout: 10_000
+ max_waiting: 2,
+ recv_timeout: 5_000
]
config :pleroma, :hackney_pools,
@@ -680,13 +772,30 @@
config :pleroma, :majic_pool, size: 2
+private_instance? = :if_instance_is_private
+
config :pleroma, :restrict_unauthenticated,
- timelines: %{local: false, federated: false},
- profiles: %{local: false, remote: false},
- activities: %{local: false, remote: false}
+ timelines: %{local: private_instance?, federated: private_instance?},
+ profiles: %{local: private_instance?, remote: private_instance?},
+ activities: %{local: private_instance?, remote: private_instance?}
config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
+config :pleroma, :mrf,
+ policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
+ transparency: true,
+ transparency_exclusions: []
+
+config :tzdata, :http_client, Pleroma.HTTP.Tzdata
+
+config :ex_aws, http_client: Pleroma.HTTP.ExAws
+
+config :pleroma, :instances_favicons, enabled: false
+
+config :floki, :html_parser, Floki.HTMLParser.FastHtml
+
+config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
+
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
diff --git a/config/description.exs b/config/description.exs
index 2afc5e366..d05adf88b 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -12,6 +12,55 @@
compress: false
]
+installed_frontend_options = [
+ %{
+ key: "name",
+ label: "Name",
+ type: :string,
+ description:
+ "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
+ },
+ %{
+ key: "ref",
+ label: "Reference",
+ type: :string,
+ description:
+ "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
+ }
+]
+
+frontend_options = [
+ %{
+ key: "name",
+ label: "Name",
+ type: :string,
+ description: "Name of the frontend."
+ },
+ %{
+ key: "ref",
+ label: "Reference",
+ type: :string,
+ description: "Reference of the frontend to be used."
+ },
+ %{
+ key: "git",
+ type: :string,
+ description: "URL of the git repository of the frontend"
+ },
+ %{
+ key: "build_url",
+ type: :string,
+ description:
+ "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
+ example: "https://some.url/builds/${ref}.zip"
+ },
+ %{
+ key: "build_dir",
+ type: :string,
+ description: "The directory inside the zip file "
+ }
+]
+
config :pleroma, :config_description, [
%{
group: :pleroma,
@@ -23,29 +72,26 @@
key: :uploader,
type: :module,
description: "Module which will be used for uploads",
- suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.S3]
+ suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
},
%{
key: :filters,
type: {:list, :module},
description:
"List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/upload/filter",
- "Elixir.Pleroma.Upload.Filter."
- )
+ suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
},
%{
key: :link_name,
type: :boolean,
description:
- "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
+ "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
},
%{
key: :base_url,
+ label: "Base URL",
type: :string,
- description: "Base url for the uploads, needed if you use CDN",
+ description: "Base URL for the uploads, needed if you use CDN",
suggestions: [
"https://cdn-host.com"
]
@@ -58,6 +104,7 @@
},
%{
key: :proxy_opts,
+ label: "Proxy Options",
type: :keyword,
description: "Options for Pleroma.ReverseProxy",
suggestions: [
@@ -85,6 +132,7 @@
},
%{
key: :http,
+ label: "HTTP",
type: :keyword,
description: "HTTP options",
children: [
@@ -193,7 +241,9 @@
%{
key: :args,
type: [:string, {:list, :string}, {:list, :tuple}],
- description: "List of actions for the mogrify command",
+ description:
+ "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
+ "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
suggestions: [
"strip",
"auto-orient",
@@ -479,6 +529,7 @@
%{
group: :pleroma,
key: :uri_schemes,
+ label: "URI Schemes",
type: :group,
description: "URI schemes related settings",
children: [
@@ -492,6 +543,7 @@
"dat",
"dweb",
"gopher",
+ "hyper",
"ipfs",
"ipns",
"irc",
@@ -651,17 +703,22 @@
key: :invites_enabled,
type: :boolean,
description:
- "Enable user invitations for admins (depends on `registrations_open` being disabled)."
+ "Enable user invitations for admins (depends on `registrations_open` being disabled)"
},
%{
key: :account_activation_required,
type: :boolean,
- description: "Require users to confirm their emails before signing in."
+ description: "Require users to confirm their emails before signing in"
+ },
+ %{
+ key: :account_approval_required,
+ type: :boolean,
+ description: "Require users to be manually approved by an admin before signing in"
},
%{
key: :federating,
type: :boolean,
- description: "Enable federation with other instances."
+ description: "Enable federation with other instances"
},
%{
key: :federation_incoming_replies_max_depth,
@@ -679,7 +736,7 @@
label: "Fed. reachability timeout days",
type: :integer,
description:
- "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.",
+ "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
suggestions: [
7
]
@@ -689,23 +746,13 @@
type: :boolean,
description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
},
- %{
- key: :rewrite_policy,
- type: [:module, {:list, :module}],
- description:
- "A list of enabled MRF policies. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/web/activity_pub/mrf",
- "Elixir.Pleroma.Web.ActivityPub.MRF."
- )
- },
%{
key: :public,
type: :boolean,
description:
- "Makes the client API in authentificated mode-only except for user-profiles." <>
- " Useful for disabling the Local Timeline and The Whole Known Network."
+ "Makes the client API in authenticated mode-only except for user-profiles." <>
+ " Useful for disabling the Local Timeline and The Whole Known Network. " <>
+ " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
},
%{
key: :quarantined_instances,
@@ -742,23 +789,6 @@
"text/bbcode"
]
},
- %{
- key: :mrf_transparency,
- label: "MRF transparency",
- type: :boolean,
- description:
- "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
- },
- %{
- key: :mrf_transparency_exclusions,
- label: "MRF transparency exclusions",
- type: {:list, :string},
- description:
- "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
- suggestions: [
- "exclusion.com"
- ]
- },
%{
key: :extended_nickname_format,
type: :boolean,
@@ -802,23 +832,6 @@
type: :boolean,
description: "Enable to automatically add attachment link text to statuses"
},
- %{
- key: :welcome_message,
- type: :string,
- description:
- "A message that will be sent to a newly registered users as a direct message",
- suggestions: [
- "Hi, @username! Welcome on board!"
- ]
- },
- %{
- key: :welcome_user_nickname,
- type: :string,
- description: "The nickname of the local user that sends the welcome message",
- suggestions: [
- "lain"
- ]
- },
%{
key: :max_report_comment_size,
type: :integer,
@@ -829,6 +842,7 @@
},
%{
key: :safe_dm_mentions,
+ label: "Safe DM mentions",
type: :boolean,
description:
"If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
@@ -868,7 +882,7 @@
%{
key: :skip_thread_containment,
type: :boolean,
- description: "Skip filtering out broken threads. Default: enabled"
+ description: "Skip filtering out broken threads. Default: enabled."
},
%{
key: :limit_to_local_content,
@@ -914,6 +928,14 @@
2048
]
},
+ %{
+ key: :registration_reason_length,
+ type: :integer,
+ description: "Maximum registration reason length. Default: 500.",
+ suggestions: [
+ 500
+ ]
+ },
%{
key: :external_user_synchronization,
type: :boolean,
@@ -932,6 +954,7 @@
children: [
%{
key: :totp,
+ label: "TOTP settings",
type: :keyword,
description: "TOTP settings",
suggestions: [digits: 6, period: 30],
@@ -948,7 +971,7 @@
type: :integer,
suggestions: [30],
description:
- "a period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
+ "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
}
]
},
@@ -962,7 +985,7 @@
key: :number,
type: :integer,
suggestions: [5],
- description: "number of backup codes to generate."
+ description: "Number of backup codes to generate."
},
%{
key: :length,
@@ -977,10 +1000,122 @@
},
%{
key: :instance_thumbnail,
- type: :string,
+ type: {:string, :image},
description:
- "The instance thumbnail image. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html)",
+ "The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.",
suggestions: ["/instance/thumbnail.jpeg"]
+ },
+ %{
+ key: :show_reactions,
+ type: :boolean,
+ description: "Let favourites and emoji reactions be viewed through the API."
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :welcome,
+ type: :group,
+ description: "Welcome messages settings",
+ children: [
+ %{
+ key: :direct_message,
+ type: :keyword,
+ descpiption: "Direct message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending a direct message to newly registered users"
+ },
+ %{
+ key: :message,
+ type: :string,
+ description: "A message that will be sent to newly registered users",
+ suggestions: [
+ "Hi, @username! Welcome on board!"
+ ]
+ },
+ %{
+ key: :sender_nickname,
+ type: :string,
+ description: "The nickname of the local user that sends a welcome message",
+ suggestions: [
+ "lain"
+ ]
+ }
+ ]
+ },
+ %{
+ key: :chat_message,
+ type: :keyword,
+ descpiption: "Chat message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending a chat message to newly registered users"
+ },
+ %{
+ key: :message,
+ type: :string,
+ description:
+ "A message that will be sent to newly registered users as a chat message",
+ suggestions: [
+ "Hello, welcome on board!"
+ ]
+ },
+ %{
+ key: :sender_nickname,
+ type: :string,
+ description: "The nickname of the local user that sends a welcome chat message",
+ suggestions: [
+ "lain"
+ ]
+ }
+ ]
+ },
+ %{
+ key: :email,
+ type: :keyword,
+ descpiption: "Email message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending an email to newly registered users"
+ },
+ %{
+ key: :sender,
+ type: [:string, :tuple],
+ description:
+ "Email address and/or nickname that will be used to send the welcome email.",
+ suggestions: [
+ {"Pleroma App", "welcome@pleroma.app"}
+ ]
+ },
+ %{
+ key: :subject,
+ type: :string,
+ description:
+ "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
+ suggestions: ["Welcome to <%= instance_name%>"]
+ },
+ %{
+ key: :html,
+ type: :string,
+ description:
+ "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
+ suggestions: ["
Hello <%= user.name%>. Welcome to <%= instance_name%>
#{object.data["content"]}"
- else
- _ -> object.data["content"] || ""
- end
- end
+ def render_content(%{data: %{"name" => name}} = object) when not is_nil(name) and name != "" do
+ url = object.data["url"] || object.data["id"]
- def render_content(%{data: %{"type" => object_type}} = object)
- when object_type in ["Article", "Page"] do
- with summary when not is_nil(summary) and summary != "" <- object.data["name"],
- url when is_bitstring(url) <- object.data["url"] do
- "
\nView Reports in AdminFE\n"
end
test "it works when the reporter is a remote user without email" do
@@ -46,4 +46,24 @@ test "it works when the reporter is a remote user without email" do
assert res.to == [{to_user.name, to_user.email}]
assert res.from == {config[:name], config[:notify_email]}
end
+
+ test "new unapproved registration email" do
+ config = Pleroma.Config.get(:instance)
+ to_user = insert(:user)
+ account = insert(:user, registration_reason: "Plz let me in")
+
+ res = AdminEmail.new_unapproved_registration(to_user, account)
+
+ account_url = Helpers.user_feed_url(Pleroma.Web.Endpoint, :feed_redirect, account.id)
+
+ assert res.to == [{to_user.name, to_user.email}]
+ assert res.from == {config[:name], config[:notify_email]}
+ assert res.subject == "New account up for review on #{config[:name]} (@#{account.nickname})"
+
+ assert res.html_body == """
+
+ Visit AdminFE
+ """
+ end
end
diff --git a/test/emails/mailer_test.exs b/test/emails/mailer_test.exs
index e6e34cba8..9e232d2a0 100644
--- a/test/emails/mailer_test.exs
+++ b/test/emails/mailer_test.exs
@@ -14,11 +14,12 @@ defmodule Pleroma.Emails.MailerTest do
subject: "Pleroma test email",
to: [{"Test User", "user1@example.com"}]
}
- setup do: clear_config([Pleroma.Emails.Mailer, :enabled])
+ setup do: clear_config([Pleroma.Emails.Mailer, :enabled], true)
test "not send email when mailer is disabled" do
- Pleroma.Config.put([Pleroma.Emails.Mailer, :enabled], false)
+ clear_config([Pleroma.Emails.Mailer, :enabled], false)
Mailer.deliver(@email)
+ :timer.sleep(100)
refute_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@ -30,6 +31,7 @@ test "not send email when mailer is disabled" do
test "send email" do
Mailer.deliver(@email)
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@ -41,6 +43,7 @@ test "send email" do
test "perform" do
Mailer.perform(:deliver_async, @email, [])
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
diff --git a/test/filter_test.exs b/test/filter_test.exs
index 63a30c736..0a5c4426a 100644
--- a/test/filter_test.exs
+++ b/test/filter_test.exs
@@ -3,37 +3,39 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.FilterTest do
- alias Pleroma.Repo
use Pleroma.DataCase
import Pleroma.Factory
+ alias Pleroma.Filter
+ alias Pleroma.Repo
+
describe "creating filters" do
test "creating one filter" do
user = insert(:user)
- query = %Pleroma.Filter{
+ query = %Filter{
user_id: user.id,
filter_id: 42,
phrase: "knights",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter} = Pleroma.Filter.create(query)
- result = Pleroma.Filter.get(filter.filter_id, user)
+ {:ok, %Filter{} = filter} = Filter.create(query)
+ result = Filter.get(filter.filter_id, user)
assert query.phrase == result.phrase
end
test "creating one filter without a pre-defined filter_id" do
user = insert(:user)
- query = %Pleroma.Filter{
+ query = %Filter{
user_id: user.id,
phrase: "knights",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter} = Pleroma.Filter.create(query)
+ {:ok, %Filter{} = filter} = Filter.create(query)
# Should start at 1
assert filter.filter_id == 1
end
@@ -41,23 +43,23 @@ test "creating one filter without a pre-defined filter_id" do
test "creating additional filters uses previous highest filter_id + 1" do
user = insert(:user)
- query_one = %Pleroma.Filter{
+ query_one = %Filter{
user_id: user.id,
filter_id: 42,
phrase: "knights",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter_one} = Pleroma.Filter.create(query_one)
+ {:ok, %Filter{} = filter_one} = Filter.create(query_one)
- query_two = %Pleroma.Filter{
+ query_two = %Filter{
user_id: user.id,
# No filter_id
phrase: "who",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter_two} = Pleroma.Filter.create(query_two)
+ {:ok, %Filter{} = filter_two} = Filter.create(query_two)
assert filter_two.filter_id == filter_one.filter_id + 1
end
@@ -65,29 +67,29 @@ test "filter_id is unique per user" do
user_one = insert(:user)
user_two = insert(:user)
- query_one = %Pleroma.Filter{
+ query_one = %Filter{
user_id: user_one.id,
phrase: "knights",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter_one} = Pleroma.Filter.create(query_one)
+ {:ok, %Filter{} = filter_one} = Filter.create(query_one)
- query_two = %Pleroma.Filter{
+ query_two = %Filter{
user_id: user_two.id,
phrase: "who",
context: ["home"]
}
- {:ok, %Pleroma.Filter{} = filter_two} = Pleroma.Filter.create(query_two)
+ {:ok, %Filter{} = filter_two} = Filter.create(query_two)
assert filter_one.filter_id == 1
assert filter_two.filter_id == 1
- result_one = Pleroma.Filter.get(filter_one.filter_id, user_one)
+ result_one = Filter.get(filter_one.filter_id, user_one)
assert result_one.phrase == filter_one.phrase
- result_two = Pleroma.Filter.get(filter_two.filter_id, user_two)
+ result_two = Filter.get(filter_two.filter_id, user_two)
assert result_two.phrase == filter_two.phrase
end
end
@@ -95,38 +97,38 @@ test "filter_id is unique per user" do
test "deleting a filter" do
user = insert(:user)
- query = %Pleroma.Filter{
+ query = %Filter{
user_id: user.id,
filter_id: 0,
phrase: "knights",
context: ["home"]
}
- {:ok, _filter} = Pleroma.Filter.create(query)
- {:ok, filter} = Pleroma.Filter.delete(query)
- assert is_nil(Repo.get(Pleroma.Filter, filter.filter_id))
+ {:ok, _filter} = Filter.create(query)
+ {:ok, filter} = Filter.delete(query)
+ assert is_nil(Repo.get(Filter, filter.filter_id))
end
test "getting all filters by an user" do
user = insert(:user)
- query_one = %Pleroma.Filter{
+ query_one = %Filter{
user_id: user.id,
filter_id: 1,
phrase: "knights",
context: ["home"]
}
- query_two = %Pleroma.Filter{
+ query_two = %Filter{
user_id: user.id,
filter_id: 2,
phrase: "who",
context: ["home"]
}
- {:ok, filter_one} = Pleroma.Filter.create(query_one)
- {:ok, filter_two} = Pleroma.Filter.create(query_two)
- filters = Pleroma.Filter.get_filters(user)
+ {:ok, filter_one} = Filter.create(query_one)
+ {:ok, filter_two} = Filter.create(query_two)
+ filters = Filter.get_filters(user)
assert filter_one in filters
assert filter_two in filters
end
@@ -134,7 +136,7 @@ test "getting all filters by an user" do
test "updating a filter" do
user = insert(:user)
- query_one = %Pleroma.Filter{
+ query_one = %Filter{
user_id: user.id,
filter_id: 1,
phrase: "knights",
@@ -146,8 +148,9 @@ test "updating a filter" do
context: ["home", "timeline"]
}
- {:ok, filter_one} = Pleroma.Filter.create(query_one)
- {:ok, filter_two} = Pleroma.Filter.update(filter_one, changes)
+ {:ok, filter_one} = Filter.create(query_one)
+ {:ok, filter_two} = Filter.update(filter_one, changes)
+
assert filter_one != filter_two
assert filter_two.phrase == changes.phrase
assert filter_two.context == changes.context
diff --git a/test/fixtures/23211.atom b/test/fixtures/23211.atom
deleted file mode 100644
index d5d111baa..000000000
--- a/test/fixtures/23211.atom
+++ /dev/null
@@ -1,508 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-02T14:59:30+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2015260:2017-05-02T14:45:47+00:00
- Favorite
- lambadalambda favorited something by godemperorofdune: <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> It's because your instance decided to be trap! lol.</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T14:45:47+00:00
- 2017-05-02T14:45:47+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:pawoo.net,2017-05-02:objectId=7397439:objectType=Status
- New comment by godemperorofdune
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> It's because your instance decided to be trap! lol.</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=136e244b26cdf1e9
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.heldscal.la,2017-05-02:noticeId=2015221:objectType=note
- New note by lambadalambda
- Some script thinks I'm a mastodon server.<br /> <br /> [info] GET /api/v1/timelines/public<br /> [debug] Processing with Fallback.RedirectController.redirector/2<br /> Parameters: %{"limit" => "40", "path" => ["api", "v1", "timelines", "public"]}<br /> Pipelines: []
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T14:40:50+00:00
- 2017-05-02T14:40:50+00:00
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=136e244b26cdf1e9
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-05-02:noticeId=2014759:objectType=comment
- New comment by lambadalambda
- @<a href="https://mstdn.io/users/mattskala" class="h-card u-url p-nickname mention" title="Matthew Skala">mattskala</a> You and @<a href="https://mastodon.social/users/kevinmarks" class="h-card u-url p-nickname mention" title="Kevin Marks">kevinmarks</a> are not wrong, but my comment was a suggestion to users and admins: Don't use big instances, don't run big instances. Also, it's a secondary advice to devs: Don't add features that encourage big instances.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T14:11:54+00:00
- 2017-05-02T14:11:54+00:00
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=58e32e013ab6487d
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-05-02:noticeId=2014684:objectType=comment
- New comment by lambadalambda
- @<a href="https://mastodon.social/users/Ronkjeffries" class="h-card u-url p-nickname mention" title="Ron K Jeffries social">ronkjeffries</a> @<a href="https://xoxo.zone/users/KevinMarks" class="h-card u-url p-nickname mention" title="Kevin Marks ">kevinmarks</a> Usually people who run their own private instance just look at the timelines of other servers, follow a seed population and then go from there. This is of course hard on Mastodon, because it doesn't have a publicly visible timeline.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T14:07:00+00:00
- 2017-05-02T14:07:00+00:00
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=58e32e013ab6487d
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2014584:2017-05-02T14:05:32+00:00
- Favorite
- lambadalambda favorited something by mattskala: <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> It's reasonable to expect that instance sizes will obey a power-law distribution because that's what such things in nature nearly always do. If so, there'll necessarily be a few instances much larger than the others; even if most are small, the network both socially and technically has to be able to deal with the existence of the few large ones.</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T14:05:32+00:00
- 2017-05-02T14:05:32+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:mstdn.io,2017-05-02:objectId=1316931:objectType=Status
- New comment by mattskala
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> It's reasonable to expect that instance sizes will obey a power-law distribution because that's what such things in nature nearly always do. If so, there'll necessarily be a few instances much larger than the others; even if most are small, the network both socially and technically has to be able to deal with the existence of the few large ones.</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=58e32e013ab6487d
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2013568:2017-05-02T14:05:29+00:00
- Favorite
- lambadalambda favorited something by kevinmarks: <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> except instance populations will be power law distributed, and the problems for the tummlers are worse at scale</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T14:05:29+00:00
- 2017-05-02T14:05:29+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:xoxo.zone,2017-05-02:objectId=89478:objectType=Status
- New comment by kevinmarks
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> except instance populations will be power law distributed, and the problems for the tummlers are worse at scale</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=58e32e013ab6487d
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2014060:2017-05-02T13:34:32+00:00
- Favorite
- lambadalambda favorited something by gcarregues: <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> Oh purée ! Ma vie en images !</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T13:34:32+00:00
- 2017-05-02T13:34:32+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:mastodon.etalab.gouv.fr,2017-05-02:objectId=55287:objectType=Status
- New comment by gcarregues
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> Oh purée ! Ma vie en images !</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:note:2013573:2017-05-02T13:03:33+00:00
- Favorite
- lambadalambda favorited something by phildobangnz: also @<a href="https://sealion.club/user/579" class="h-card mention" title="Sim Bot">sim</a> reminder you are awesome; don't even trip- u kewler than Tutankhamen's cucumber, fam. Okay, good night.
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T13:03:33+00:00
- 2017-05-02T13:03:33+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:sealion.club,2017-05-02:noticeId=3060818:objectType=note
- New note by phildobangnz
- also @<a href="https://sealion.club/user/579" class="h-card mention" title="Sim Bot">sim</a> reminder you are awesome; don't even trip- u kewler than Tutankhamen's cucumber, fam. Okay, good night.
-
-
-
-
-
-
- https://sealion.club/conversation/1633267
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-05-02:noticeId=2013586:objectType=comment
- New comment by lambadalambda
- @<a href="https://xoxo.zone/users/KevinMarks" class="h-card u-url p-nickname mention" title="Kevin Marks ">kevinmarks</a> People can stay in their giant unmoderatable instances with meaningless public and federated timelines and experience constant federation drama if they want. I'll stay here with my 5 friends.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T12:54:59+00:00
- 2017-05-02T12:54:59+00:00
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=58e32e013ab6487d
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:note:2013486:2017-05-02T12:46:48+00:00
- Favorite
- lambadalambda favorited something by fortune: There once was a dentist named Stone<br /> Who saw all his patients alone.<br /> In a fit of depravity<br /> He filled the wrong cavity,<br /> And my, how his practice has grown!
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:46:48+00:00
- 2017-05-02T12:46:48+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.kawa-kun.com,2017-05-02:noticeId=1655658:objectType=note
- New note by fortune
- There once was a dentist named Stone<br /> Who saw all his patients alone.<br /> In a fit of depravity<br /> He filled the wrong cavity,<br /> And my, how his practice has grown!
-
-
-
-
-
-
- https://gs.kawa-kun.com/conversation/714072
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:note:2013365:2017-05-02T12:37:55+00:00
- Favorite
- lambadalambda favorited something by xj9: <p>> rollerblading to work</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:37:55+00:00
- 2017-05-02T12:37:55+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:sunshinegardens.org,2017-05-02:objectId=61020:objectType=Status
- New note by xj9
- <p>> rollerblading to work</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=5a0e98612f634218
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2013259:2017-05-02T12:29:03+00:00
- Favorite
- lambadalambda favorited something by cereal: @<a href="https://gs.smuglo.li/user/28250" class="h-card mention" title="Bricky">thatbrickster</a> @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> But why?
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:29:03+00:00
- 2017-05-02T12:29:03+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:sealion.club,2017-05-02:noticeId=3059985:objectType=comment
- New comment by cereal
- @<a href="https://gs.smuglo.li/user/28250" class="h-card mention" title="Bricky">thatbrickster</a> @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> But why?
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2013227:2017-05-02T12:24:27+00:00
- Favorite
- lambadalambda favorited something by thatbrickster: @<a href="https://social.heldscal.la/user/23211" class="h-card u-url p-nickname mention" title="Constance Variable">lambadalambda</a> install gentoo
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:24:27+00:00
- 2017-05-02T12:24:27+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:gs.smuglo.li,2017-05-02:noticeId=2144296:objectType=comment
- New comment by thatbrickster
- @<a href="https://social.heldscal.la/user/23211" class="h-card u-url p-nickname mention" title="Constance Variable">lambadalambda</a> install gentoo
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2013213:2017-05-02T12:22:53+00:00
- Favorite
- lambadalambda favorited something by dwmatiz: @<a href="https://social.heldscal.la/user/23211" class="h-card mention">lambadalambda</a> *unzips dick*
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:22:53+00:00
- 2017-05-02T12:22:53+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:sealion.club,2017-05-02:noticeId=3059800:objectType=comment
- New comment by dwmatiz
- @<a href="https://social.heldscal.la/user/23211" class="h-card mention">lambadalambda</a> *unzips dick*
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2013199:2017-05-02T12:22:03+00:00
- Favorite
- lambadalambda favorited something by shpuld: @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> get #<span class="tag"><a href="https://shitposter.club/tag/cofe" rel="tag">cofe</a></span>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:22:03+00:00
- 2017-05-02T12:22:03+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:shitposter.club,2017-05-02:noticeId=2783524:objectType=comment
- New comment by shpuld
- @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> get #<span class="tag"><a href="https://shitposter.club/tag/cofe" rel="tag">cofe</a></span>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.heldscal.la,2017-05-02:noticeId=2013185:objectType=note
- New note by lambadalambda
- What now? <a href="https://social.heldscal.la/file/e4822d95de677757ff50d49672a4046c83218b76c04a0ad5e5f1f0a9a9eb1a74.gif" title="https://social.heldscal.la/file/e4822d95de677757ff50d49672a4046c83218b76c04a0ad5e5f1f0a9a9eb1a74.gif" rel="nofollow external noreferrer" class="attachment" id="attachment-422572">https://social.heldscal.la/attachment/422572</a>
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T12:21:04+00:00
- 2017-05-02T12:21:04+00:00
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2c27c27df8ec4dcc
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:note:2012929:2017-05-02T12:01:25+00:00
- Favorite
- lambadalambda favorited something by drkmttr: <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> I checked out No Agenda because I saw you mention it several time. Sadly, I wasn't impressed. I'm all about varying perspectives but Adam and John basically just sound like resentful curmudgeons. It seems like their shtick is basically playing devil's advocate to everything to arouse some discontent. Just my two cents. 😉</p>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T12:01:25+00:00
- 2017-05-02T12:01:25+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:mstdn.io,2017-05-02:objectId=1310093:objectType=Status
- New note by drkmttr
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> I checked out No Agenda because I saw you mention it several time. Sadly, I wasn't impressed. I'm all about varying perspectives but Adam and John basically just sound like resentful curmudgeons. It seems like their shtick is basically playing devil's advocate to everything to arouse some discontent. Just my two cents. 😉</p>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=2f329b4eb20e83e2
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2012336:2017-05-02T11:06:42+00:00
- Favorite
- lambadalambda favorited something by clacke: @<a href="https://mastodon.org.uk/users/dick_turpin" class="h-card u-url p-nickname mention" title="dick_turpin">dickturpin</a> @<a href="http://quitter.se/user/113503" class="h-card u-url p-nickname mention" title="Luke">luke</a> Oh no, I miss being irritated by you, it helps me understand myself and others. Also it builds character. :-)<br /> <br /> So if this is not federation because you can't follow all of online mankind, what should we call it? Proto-federated? Pre-federated?<br /> <br /> The term has been used decades ago for just one Microsoft Active Directory domain cross-certifying the root of another, by mutual agreement. I don't see how it's any less relevant to opportunistic federation between open servers on an open internet.<br /> <br /> I'm not saying we should be satisfied, I'm just saying that "federate" is a useful word and to build a big system we need to start with a small one. And focus on the things we *can* change, like helping the OStatus network grow and making the tools more useful.<br /> <br /> Saying that the network's ideals have failed because other networks aren't joining is doing neither of that.
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T11:06:42+00:00
- 2017-05-02T11:06:42+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-05-02:noticeId=2012336:objectType=comment
- New comment by clacke
- @<a href="https://mastodon.org.uk/users/dick_turpin" class="h-card u-url p-nickname mention" title="dick_turpin">dickturpin</a> @<a href="http://quitter.se/user/113503" class="h-card u-url p-nickname mention" title="Luke">luke</a> Oh no, I miss being irritated by you, it helps me understand myself and others. Also it builds character. :-)<br /> <br /> So if this is not federation because you can't follow all of online mankind, what should we call it? Proto-federated? Pre-federated?<br /> <br /> The term has been used decades ago for just one Microsoft Active Directory domain cross-certifying the root of another, by mutual agreement. I don't see how it's any less relevant to opportunistic federation between open servers on an open internet.<br /> <br /> I'm not saying we should be satisfied, I'm just saying that "federate" is a useful word and to build a big system we need to start with a small one. And focus on the things we *can* change, like helping the OStatus network grow and making the tools more useful.<br /> <br /> Saying that the network's ideals have failed because other networks aren't joining is doing neither of that.
-
-
-
-
-
-
- https://s.wefamlee.be/conversation/16478
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:fave:23211:comment:2011332:2017-05-02T10:37:40+00:00
- Favorite
- lambadalambda favorited something by moonman: @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> <a href="https://www.youtube.com/watch?v=mKLizztikRk" title="https://www.youtube.com/watch?v=mKLizztikRk" class="attachment" rel="nofollow">https://www.youtube.com/watch?v=mKLizztikRk</a>
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-02T10:37:40+00:00
- 2017-05-02T10:37:40+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:shitposter.club,2017-05-02:noticeId=2781833:objectType=comment
- New comment by moonman
- @<a href="https://social.heldscal.la/user/23211" class="h-card mention" title="Constance Variable">lambadalambda</a> <a href="https://www.youtube.com/watch?v=mKLizztikRk" title="https://www.youtube.com/watch?v=mKLizztikRk" class="attachment" rel="nofollow">https://www.youtube.com/watch?v=mKLizztikRk</a>
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=11d8b8c27d9513ec
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-05-02:noticeId=2012145:objectType=comment
- New comment by lambadalambda
- @<a href="https://sealion.club/user/186" class="h-card u-url p-nickname mention" title="I'M CEREAL U GUISE">cereal</a> ? No, you don't even need the identity servers for federation.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T10:37:33+00:00
- 2017-05-02T10:37:33+00:00
-
-
-
- https://sealion.club/conversation/1629037
-
-
-
-
-
-
-
diff --git a/test/fixtures/DSCN0010.jpg b/test/fixtures/DSCN0010.jpg
new file mode 100644
index 000000000..4a2c1552b
Binary files /dev/null and b/test/fixtures/DSCN0010.jpg differ
diff --git a/test/fixtures/config/temp.secret.exs b/test/fixtures/config/temp.secret.exs
index dc950ca30..fa8c7c7e8 100644
--- a/test/fixtures/config/temp.secret.exs
+++ b/test/fixtures/config/temp.secret.exs
@@ -9,3 +9,5 @@
config :pleroma, Pleroma.Repo, pool: Ecto.Adapters.SQL.Sandbox
config :postgrex, :json_library, Poison
+
+config :pleroma, :database, rum_enabled: true
diff --git a/test/fixtures/cw_retweet.xml b/test/fixtures/cw_retweet.xml
deleted file mode 100644
index c99a569d7..000000000
--- a/test/fixtures/cw_retweet.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
- https://mastodon.social/users/lambadalambda.atom
- Critical Value
-
- 2017-04-16T21:47:25Z
- https://files.mastodon.social/accounts/avatars/000/000/264/original/1429214160519.gif
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
-
-
-
-
-
- tag:mastodon.social,2017-05-11:objectId=5647963:objectType=Status
- 2017-05-11T10:23:15Z
- 2017-05-11T10:23:15Z
- lambadalambda shared a status by Skruyb@mamot.fr
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:mamot.fr,2017-05-10:objectId=1294943:objectType=Status
- 2017-05-10T17:31:44Z
- 2017-05-10T17:31:45Z
- New status by Skruyb@mamot.fr
-
- https://mamot.fr/users/Skruyb
- http://activitystrea.ms/schema/1.0/person
- https://mamot.fr/users/Skruyb
- Skruyb
- Skruyb@mamot.fr
- <p>Fr and En.<br>Posts will disappear on a regular basis.</p>
-
-
-
- Skruyb
- The 7th Son
- Fr and En.Posts will disappear on a regular basis.
- public
-
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- Hey.
- <p><span class="h-card"><a href="https://mastodon.social/@lambadalambda">@<span>lambadalambda</span></a></span></p><p>Hey!!!</p>
-
-
- public
-
-
-
- <p><span class="h-card"><a href="https://mastodon.social/@lambadalambda">@<span>lambadalambda</span></a></span></p><p>Hey!!!</p>
-
- public
-
-
-
-
diff --git a/test/fixtures/delete.xml b/test/fixtures/delete.xml
deleted file mode 100644
index 731e1c204..000000000
--- a/test/fixtures/delete.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- https://mastodon.sdf.org/users/snowdusk.atom
- snowdusk
- Amateur live performance DJ/radio DJ on SDF's underground Internet radio http://aNONradio.net (LIVE Sat Sun Mon Tue 23:00-24:00 UTC) - http://snowdusk.sdf.org
- 2017-06-17T04:14:34Z
- https://mastodon.sdf.org/system/accounts/avatars/000/000/002/original/405a7652d5f60449.jpg?1497672873
-
- https://mastodon.sdf.org/users/snowdusk
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.sdf.org/users/snowdusk
- snowdusk
- snowdusk@mastodon.sdf.org
- <p>Amateur live performance DJ/radio DJ on SDF's underground Internet radio <a href="http://anonradio.net/" rel="nofollow noopener" target="_blank"><span class="invisible">http://</span><span class="">anonradio.net/</span><span class="invisible"></span></a> (LIVE Sat Sun Mon Tue 23:00-24:00 UTC) - <a href="http://snowdusk.sdf.org/" rel="nofollow noopener" target="_blank"><span class="invisible">http://</span><span class="">snowdusk.sdf.org/</span><span class="invisible"></span></a></p>
-
-
-
- snowdusk
- snowdusk
- Amateur live performance DJ/radio DJ on SDF's underground Internet radio http://aNONradio.net (LIVE Sat Sun Mon Tue 23:00-24:00 UTC) - http://snowdusk.sdf.org
- public
-
-
-
-
-
-
-
- tag:mastodon.sdf.org,2017-06-10:objectId=310513:objectType=Status
- 2017-06-10T22:02:31Z
- 2017-06-10T22:02:31Z
- snowdusk deleted status
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/delete
- Deleted status
-
-
-
-
diff --git a/test/fixtures/dm.xml b/test/fixtures/dm.xml
deleted file mode 100644
index d0b8aa811..000000000
--- a/test/fixtures/dm.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- tag:mastodon.social,2017-06-30:objectId=11260427:objectType=Status
- 2017-06-30T13:27:47Z
- 2017-06-30T13:27:47Z
- New status by lambadalambda
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
- lambadalambda
- Critical Value
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> Hey.</p>
-
- direct
-
-
-
-
diff --git a/test/fixtures/favorite.xml b/test/fixtures/favorite.xml
deleted file mode 100644
index c32b4a403..000000000
--- a/test/fixtures/favorite.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-05T09:12:53+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-05:fave:23211:comment:2061643:2017-05-05T09:12:50+00:00
- Favorite
- lambadalambda favorited something by moonman: @<a href="https://shitposter.club/user/9655" class="h-card mention" title="Solidarity for Pigs">neimzr4luzerz</a> @<a href="https://gs.smuglo.li/user/2326" class="h-card mention" title="Dolus_McHonest">dolus</a> childhood poring over Strong's concordance and a koine Greek dictionary, fast forward to 2017 and some fuckstick who translates japanese jackoff material tells me you just need to make it sound right in English
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-05T09:12:50+00:00
- 2017-05-05T09:12:50+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- tag:shitposter.club,2017-05-05:noticeId=2827873:objectType=comment
- New comment by moonman
- @<a href="https://shitposter.club/user/9655" class="h-card mention" title="Solidarity for Pigs">neimzr4luzerz</a> @<a href="https://gs.smuglo.li/user/2326" class="h-card mention" title="Dolus_McHonest">dolus</a> childhood poring over Strong's concordance and a koine Greek dictionary, fast forward to 2017 and some fuckstick who translates japanese jackoff material tells me you just need to make it sound right in English
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-05:objectType=thread:nonce=55ead90125cd4bd4
-
-
-
-
-
-
diff --git a/test/fixtures/favorite_with_local_note.xml b/test/fixtures/favorite_with_local_note.xml
deleted file mode 100644
index 3c955607d..000000000
--- a/test/fixtures/favorite_with_local_note.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-05T09:12:53+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-05:fave:23211:comment:2061643:2017-05-05T09:12:50+00:00
- Favorite
- lambadalambda favorited something by moonman: @<a href="https://shitposter.club/user/9655" class="h-card mention" title="Solidarity for Pigs">neimzr4luzerz</a> @<a href="https://gs.smuglo.li/user/2326" class="h-card mention" title="Dolus_McHonest">dolus</a> childhood poring over Strong's concordance and a koine Greek dictionary, fast forward to 2017 and some fuckstick who translates japanese jackoff material tells me you just need to make it sound right in English
-
- http://activitystrea.ms/schema/1.0/favorite
- 2017-05-05T09:12:50+00:00
- 2017-05-05T09:12:50+00:00
-
- http://activitystrea.ms/schema/1.0/comment
- localid
- New comment by moonman
- @<a href="https://shitposter.club/user/9655" class="h-card mention" title="Solidarity for Pigs">neimzr4luzerz</a> @<a href="https://gs.smuglo.li/user/2326" class="h-card mention" title="Dolus_McHonest">dolus</a> childhood poring over Strong's concordance and a koine Greek dictionary, fast forward to 2017 and some fuckstick who translates japanese jackoff material tells me you just need to make it sound right in English
-
-
-
-
-
- tag:social.heldscal.la,2017-05-05:objectType=thread:nonce=55ead90125cd4bd4
-
-
-
-
-
-
diff --git a/test/fixtures/fetch_mocks/104410921027210069.json b/test/fixtures/fetch_mocks/104410921027210069.json
new file mode 100644
index 000000000..583f7a4dc
--- /dev/null
+++ b/test/fixtures/fetch_mocks/104410921027210069.json
@@ -0,0 +1,72 @@
+{
+ "@context" : [
+ "https://www.w3.org/ns/activitystreams",
+ {
+ "atomUri" : "ostatus:atomUri",
+ "conversation" : "ostatus:conversation",
+ "inReplyToAtomUri" : "ostatus:inReplyToAtomUri",
+ "ostatus" : "http://ostatus.org#",
+ "sensitive" : "as:sensitive",
+ "toot" : "http://joinmastodon.org/ns#",
+ "votersCount" : "toot:votersCount"
+ }
+ ],
+ "atomUri" : "https://busshi.moe/users/tuxcrafting/statuses/104410921027210069",
+ "attachment" : [],
+ "attributedTo" : "https://busshi.moe/users/tuxcrafting",
+ "cc" : [
+ "https://busshi.moe/users/tuxcrafting/followers",
+ "https://stereophonic.space/users/fixpoint",
+ "https://blob.cat/users/blobyoumu",
+ "https://cawfee.club/users/grips",
+ "https://jaeger.website/users/igel"
+ ],
+ "content" : "
@fixpoint@blobyoumu@grips@igel there's a difference between not liking nukes and not liking nuclear power nukes are pretty bad as are all WMDs in general but disliking nuclear power just indicates you are unable of thought
",
+ "contentMap" : {
+ "en" : "
@fixpoint@blobyoumu@grips@igel there's a difference between not liking nukes and not liking nuclear power nukes are pretty bad as are all WMDs in general but disliking nuclear power just indicates you are unable of thought
web: https://tuxcrafting.port0.org pronouns: she/they languages: french (native)/english (fluent)/hebrew (ok-ish)/esperanto (barely)
",
+ "tag" : [],
+ "type" : "Person",
+ "url" : "https://busshi.moe/@tuxcrafting"
+}
diff --git a/test/fixtures/follow.xml b/test/fixtures/follow.xml
deleted file mode 100644
index d4e89954b..000000000
--- a/test/fixtures/follow.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-07T09:54:49+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-07:subscription:23211:person:44803:2017-05-07T09:54:48+00:00
- Constance Variable (lambadalambda@social.heldscal.la)'s status on Sunday, 07-May-2017 09:54:49 UTC
- <a href="https://social.heldscal.la/lambadalambda">Constance Variable</a> started following <a href="https://pawoo.net/@pekorino">mono</a>.
-
- http://activitystrea.ms/schema/1.0/follow
- 2017-05-07T09:54:49+00:00
- 2017-05-07T09:54:49+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://pawoo.net/users/pekorino
- mono
- http://shitposter.club/mono 孤独のグルメ
-
-
-
-
- pekorino
- mono
- http://shitposter.club/mono 孤独のグルメ
-
-
- tag:social.heldscal.la,2017-05-07:objectType=thread:nonce=6e80caf94e03029f
-
-
-
-
-
-
diff --git a/test/fixtures/incoming_note_activity.xml b/test/fixtures/incoming_note_activity.xml
deleted file mode 100644
index 21eda2d30..000000000
--- a/test/fixtures/incoming_note_activity.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-23:noticeId=29:objectType=note
- New note by lambda
- @<a href="http://pleroma.example.org:4000/users/lain3" class="h-card mention">lain3</a>
-
-
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-23T14:51:03+00:00
- 2017-04-23T14:51:03+00:00
-
- http://activitystrea.ms/schema/1.0/person
- http://gs.example.org:4040/index.php/user/1
- lambda
-
-
-
-
- lambda
- lambda
-
-
-
-
- tag:gs.example.org:4040,2017-04-23:objectType=thread:nonce=f09e22f58abd5c7b
-
-
-
-
-
-
-
diff --git a/test/fixtures/incoming_note_activity_answer.xml b/test/fixtures/incoming_note_activity_answer.xml
deleted file mode 100644
index b1244faa6..000000000
--- a/test/fixtures/incoming_note_activity_answer.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=55:objectType=note
- New note by lambda
- hey.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:16:13+00:00
- 2017-04-25T18:16:13+00:00
-
- http://activitystrea.ms/schema/1.0/person
- http://gs.example.org:4040/index.php/user/1
- lambda
-
-
-
-
- lambda
- lambda
-
-
-
-
-
-
- http://pleroma.example.org:4000/contexts/8f6f45d4-8e4d-4e1a-a2de-09f27367d2d0
-
-
-
-
-
-
-
diff --git a/test/fixtures/incoming_reply_mastodon.xml b/test/fixtures/incoming_reply_mastodon.xml
deleted file mode 100644
index 8ee1186cc..000000000
--- a/test/fixtures/incoming_reply_mastodon.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
- tag:mastodon.social,2017-05-02:objectId=4901603:objectType=Status
- 2017-05-02T18:33:06Z
- 2017-05-02T18:33:06Z
- New status by lambadalambda
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> hey</p>
-
-
- public
-
-
-
-
diff --git a/test/fixtures/incoming_websub_gnusocial_attachments.xml b/test/fixtures/incoming_websub_gnusocial_attachments.xml
deleted file mode 100644
index 9d331ef32..000000000
--- a/test/fixtures/incoming_websub_gnusocial_attachments.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-02T20:29:35+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.heldscal.la,2017-05-02:noticeId=2020923:objectType=note
- New note by lambadalambda
- Okay gonna stream some cool games!! <a href="https://social.heldscal.la/file/7ed5ee508e6376a6e3dd581e17e7ed0b7b638147c7e86784bf83abc2641ee3d4.gif" title="https://social.heldscal.la/file/7ed5ee508e6376a6e3dd581e17e7ed0b7b638147c7e86784bf83abc2641ee3d4.gif" rel="nofollow external noreferrer" class="attachment" id="attachment-423842">https://social.heldscal.la/attachment/423842</a> <a href="https://social.heldscal.la/file/4c209099cadfc5afd3e27a334aa0db96b3a7510dde1603305d68a2707e59a11f.png" title="https://social.heldscal.la/file/4c209099cadfc5afd3e27a334aa0db96b3a7510dde1603305d68a2707e59a11f.png" rel="nofollow external noreferrer" class="attachment" id="attachment-423843">https://social.heldscal.la/attachment/423843</a>
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-02T20:29:35+00:00
- 2017-05-02T20:29:35+00:00
-
- tag:social.heldscal.la,2017-05-02:objectType=thread:nonce=26c7afdcbcf4ebd4
-
-
-
-
-
-
-
-
diff --git a/test/fixtures/lambadalambda.atom b/test/fixtures/lambadalambda.atom
deleted file mode 100644
index 964a416f7..000000000
--- a/test/fixtures/lambadalambda.atom
+++ /dev/null
@@ -1,479 +0,0 @@
-
-
- https://mastodon.social/users/lambadalambda.atom
- Critical Value
-
- 2017-04-16T21:47:25Z
- https://files.mastodon.social/accounts/avatars/000/000/264/original/1429214160519.gif?1492379244
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
- a cool dude.
-
-
-
- lambadalambda
- Critical Value
- public
-
-
-
-
-
-
-
- tag:mastodon.social,2017-04-07:objectId=1874242:objectType=Status
- 2017-04-07T11:02:56Z
- 2017-04-07T11:02:56Z
- lambadalambda shared a status by 0xroy@social.wxcafe.net
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.wxcafe.net,2017-04-07:objectId=72554:objectType=Status
- 2017-04-07T11:01:59Z
- 2017-04-07T11:02:00Z
- New status by 0xroy@social.wxcafe.net
-
- https://social.wxcafe.net/users/0xroy
- http://activitystrea.ms/schema/1.0/person
- https://social.wxcafe.net/users/0xroy
- 0xroy
- 0xroy@social.wxcafe.net
- ta caution weeb | discussions privées : <a href="https://💌.0xroy.me" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">💌.0xroy.me</span><span class="invisible"></span></a>
-
-
-
- 0xroy
- 「R O Y 🍵 B O S」
- ta caution weeb | discussions privées : <a href="https://%F0%9F%92%8C.0xroy.me" rel="nofollow noopener"><span class="invisible">https://</span><span class="">💌.0xroy.me</span><span class="invisible"></span></a>
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>someone pls eli5 matrix (protocol) and riot</p>
-
- public
-
-
- <p>someone pls eli5 matrix (protocol) and riot</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-06:objectId=1768247:objectType=Status
- 2017-04-06T11:10:19Z
- 2017-04-06T11:10:19Z
- lambadalambda shared a status by areyoutoo@mastodon.xyz
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:mastodon.xyz,2017-04-05:objectId=133327:objectType=Status
- 2017-04-05T17:36:41Z
- 2017-04-05T18:12:14Z
- New status by areyoutoo@mastodon.xyz
-
- https://mastodon.xyz/users/areyoutoo
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.xyz/users/areyoutoo
- areyoutoo
- areyoutoo@mastodon.xyz
- devops | retired gamedev | always boost puppy pics
-
-
-
- areyoutoo
- Raw Butter
- devops | retired gamedev | always boost puppy pics
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Some UX thoughts for <a href="https://mastodon.xyz/tags/mastodev" class="mention hashtag">#<span>mastodev</span></a>:</p><p>- Would be nice if I could work on multiple draft toots? Clicking to reply to someone seems to erase any draft I had been working on.</p><p>- Kinda risky to click on the Federated Timeline if it loads new toots and scrolls 10ms before I click on something.</p><p>I probably don't know enough web frontend to help, but it might be fun to try.</p>
-
-
- public
-
-
- <p>Some UX thoughts for <a href="https://mastodon.xyz/tags/mastodev" class="mention hashtag">#<span>mastodev</span></a>:</p><p>- Would be nice if I could work on multiple draft toots? Clicking to reply to someone seems to erase any draft I had been working on.</p><p>- Kinda risky to click on the Federated Timeline if it loads new toots and scrolls 10ms before I click on something.</p><p>I probably don't know enough web frontend to help, but it might be fun to try.</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-06:objectId=1764509:objectType=Status
- 2017-04-06T10:15:38Z
- 2017-04-06T10:15:38Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- This is a test for cw federation
- <p>This is a test for cw federation body text.</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-05:objectId=1645208:objectType=Status
- 2017-04-05T07:14:53Z
- 2017-04-05T07:14:53Z
- lambadalambda shared a status by lambadalambda@social.heldscal.la
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.heldscal.la,2017-04-05:noticeId=1502088:objectType=note
- 2017-04-05T06:12:09Z
- 2017-04-05T07:12:47Z
- New status by lambadalambda@social.heldscal.la
-
- https://social.heldscal.la/user/23211
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- lambadalambda@social.heldscal.la
- Call me Deacon Blues.
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Federation 101: <a href="https://www.youtube.com/watch?v=t1lYU5CA40o" rel="nofollow external noreferrer" class="attachment thumbnail">https://www.youtube.com/watch?v=t1lYU5CA40o</a>
-
- public
-
-
- Federation 101: <a href="https://www.youtube.com/watch?v=t1lYU5CA40o" rel="nofollow external noreferrer" class="attachment thumbnail">https://www.youtube.com/watch?v=t1lYU5CA40o</a>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-05:objectId=1641750:objectType=Status
- 2017-04-05T05:44:48Z
- 2017-04-05T05:44:48Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> just a test.</p>
-
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-04:objectId=1540149:objectType=Status
- 2017-04-04T06:31:09Z
- 2017-04-04T06:31:09Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Looks like you still can't delete your account here (PRIVACY!), but I won't be posting here anymore, my main account is <span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span></p>
-
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-04:objectId=1539608:objectType=Status
- 2017-04-04T06:18:16Z
- 2017-04-04T06:18:16Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@ghostbar" class="u-url mention">@<span>ghostbar</span></a></span> Remember to rewrite it in Rust once you're done.</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1504813:objectType=Status
- 2017-04-03T18:01:20Z
- 2017-04-03T18:01:20Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.xyz/@Azurolu" class="u-url mention">@<span>Azurolu</span></a></span> You mean gs.smuglo.li?</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1504805:objectType=Status
- 2017-04-03T18:01:05Z
- 2017-04-03T18:01:05Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>There's nothing wrong with having several alt accounts all across the fediverse. Try out another mastodon instance (<a href="https://icosahedron.website" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">icosahedron.website</span><span class="invisible"></span></a>) or a GNU Social instance (like <a href="https://shitposter.club" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">shitposter.club</span><span class="invisible"></span></a> or <a href="https://freezepeach.xyz" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">freezepeach.xyz</span><span class="invisible"></span></a>), or friendica. They are all on the same network, so you can still follow all your friends!</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1503965:objectType=Status
- 2017-04-03T17:31:30Z
- 2017-04-03T17:31:30Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@20Hz" class="u-url mention">@<span>20Hz</span></a></span> you could also try out a GS instance, which are on the same network :)</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1503955:objectType=Status
- 2017-04-03T17:31:08Z
- 2017-04-03T17:31:08Z
- lambadalambda shared a status by shpuld@shitposter.club
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:shitposter.club,2017-04-03:noticeId=2251717:objectType=note
- 2017-04-03T17:06:43Z
- 2017-04-03T17:12:06Z
- New status by shpuld@shitposter.club
-
- https://shitposter.club/user/5381
- http://activitystrea.ms/schema/1.0/person
- https://shitposter.club/user/5381
- shpuld
- shpuld@shitposter.club
-
-
-
-
- shpuld
- shp
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- reposting the classic <a href="https://shitposter.club/file/89c5fe483526caf3a46cfc5cdd4ae68061054350e767397731af658d54786e31.jpg" class="attachment" rel="nofollow external">https://shitposter.club/attachment/219846</a>
-
-
- public
-
-
- reposting the classic <a href="https://shitposter.club/file/89c5fe483526caf3a46cfc5cdd4ae68061054350e767397731af658d54786e31.jpg" class="attachment" rel="nofollow external">https://shitposter.club/attachment/219846</a>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1503929:objectType=Status
- 2017-04-03T17:30:43Z
- 2017-04-03T17:30:43Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@ghostbar" class="u-url mention">@<span>ghostbar</span></a></span> Normally you shouldn't be running tens of thousands of users on one instance... That's one of the reasons for federation.</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1477255:objectType=Status
- 2017-04-03T08:24:39Z
- 2017-04-03T08:24:39Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@dot_tiff" class="u-url mention">@<span>dot_tiff</span></a></span> it's the vaporwave mode.</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1476210:objectType=Status
- 2017-04-03T07:45:42Z
- 2017-04-03T07:45:42Z
- lambadalambda shared a status by lambadalambda@social.heldscal.la
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.heldscal.la,2017-04-03:noticeId=1475727:objectType=note
- 2017-04-03T07:44:43Z
- 2017-04-03T07:44:48Z
- New status by lambadalambda@social.heldscal.la
-
- https://social.heldscal.la/user/23211
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- lambadalambda@social.heldscal.la
- Call me Deacon Blues.
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Here's a song by the original anti-idol, Togawa Jun: <a href="https://www.youtube.com/watch?v=kNI_NK2YY-s" rel="nofollow external noreferrer" class="attachment">https://www.youtube.com/watch?v=kNI_NK2YY-s</a>
-
- public
-
-
- Here's a song by the original anti-idol, Togawa Jun: <a href="https://www.youtube.com/watch?v=kNI_NK2YY-s" rel="nofollow external noreferrer" class="attachment">https://www.youtube.com/watch?v=kNI_NK2YY-s</a>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1476047:objectType=Status
- 2017-04-03T07:39:14Z
- 2017-04-03T07:39:14Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@amrrr" class="u-url mention">@<span>amrrr</span></a></span> tumblr/10, but pretty good!</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1475949:objectType=Status
- 2017-04-03T07:35:45Z
- 2017-04-03T07:35:45Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@Shookaite" class="u-url mention">@<span>Shookaite</span></a></span> Oh, you mean like userstyles?</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-03:objectId=1475581:objectType=Status
- 2017-04-03T07:20:03Z
- 2017-04-03T07:20:03Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@Shookaite" class="u-url mention">@<span>Shookaite</span></a></span> Would be nice if someone helped port Pleroma to Mastodon, that has a theme switcher (click on the cog in the upper right): <a href="https://pleroma.heldscal.la/main/all" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">pleroma.heldscal.la/main/all</span><span class="invisible"></span></a></p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-02:objectId=1457325:objectType=Status
- 2017-04-02T21:57:43Z
- 2017-04-02T21:57:43Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@rhosyn" class="u-url mention">@<span>rhosyn</span></a></span> <span class="h-card"><a href="https://mastodon.social/@Meaningness" class="u-url mention">@<span>Meaningness</span></a></span> you could take a look at those listed at social.guhnoo.org</p>
-
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-04-02:objectId=1447926:objectType=Status
- 2017-04-02T18:31:52Z
- 2017-04-02T18:31:52Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>My main account is <span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> , btw.</p>
-
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-02:objectId=1447878:objectType=Status
- 2017-04-02T18:30:37Z
- 2017-04-02T18:30:37Z
- lambadalambda shared a status by Firstaide@awoo.space
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:awoo.space,2017-04-02:objectId=135324:objectType=Status
- 2017-04-02T18:29:32Z
- 2017-04-02T18:29:32Z
- New status by Firstaide@awoo.space
-
- https://awoo.space/users/Firstaide
- http://activitystrea.ms/schema/1.0/person
- https://awoo.space/users/Firstaide
- Firstaide
- Firstaide@awoo.space
- A smol awoo account, for a smol autistic 💙
-They/them please!
-NB/white/ace
-
-
-
- Firstaide
- Miff🚑✨
- A smol awoo account, for a smol autistic 💙
-They/them please!
-NB/white/ace
- public
-
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><a href="https://mastodon.social/users/lambadalambda" class="h-card u-url p-nickname mention">@<span>lambadalambda</span></a> yeah, I think that's p much the big issue here? <br>When I first heard of Masto, I thought it was just like twitter at first, I had no idea federation was even a thing?, and I actually joined p early on? :-o </p><p>idk I think more stuff needs to be done about federation promotion, but honestly its gotta come from the get go when people get here to make an account I feel :-o</p>
-
-
- public
-
-
-
- <p><a href="https://mastodon.social/users/lambadalambda" class="h-card u-url p-nickname mention">@<span>lambadalambda</span></a> yeah, I think that's p much the big issue here? <br>When I first heard of Masto, I thought it was just like twitter at first, I had no idea federation was even a thing?, and I actually joined p early on? :-o </p><p>idk I think more stuff needs to be done about federation promotion, but honestly its gotta come from the get go when people get here to make an account I feel :-o</p>
-
- public
-
-
-
-
diff --git a/test/fixtures/mastodon-note-cw.xml b/test/fixtures/mastodon-note-cw.xml
deleted file mode 100644
index 02f49dd61..000000000
--- a/test/fixtures/mastodon-note-cw.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- https://mastodon.social/users/lambadalambda.atom
- Critical Value
-
- 2017-04-16T21:47:25Z
- https://files.mastodon.social/accounts/avatars/000/000/264/original/1429214160519.gif
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
-
-
-
-
-
- tag:mastodon.social,2017-05-10:objectId=5551985:objectType=Status
- 2017-05-10T12:21:36Z
- 2017-05-10T12:21:36Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- technologic
- <p>test</p>
-
- public
-
-
-
-
diff --git a/test/fixtures/mastodon-note-unlisted.xml b/test/fixtures/mastodon-note-unlisted.xml
deleted file mode 100644
index d21017b80..000000000
--- a/test/fixtures/mastodon-note-unlisted.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
- https://mastodon.social/users/lambadalambda.atom
- Critical Value
-
- 2017-04-16T21:47:25Z
- https://files.mastodon.social/accounts/avatars/000/000/264/original/1429214160519.gif
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
-
-
-
-
-
- tag:mastodon.social,2017-05-10:objectId=5551985:objectType=Status
- 2017-05-10T12:21:36Z
- 2017-05-10T12:21:36Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- technologic
- <p>test</p>
- unlisted
-
-
-
-
diff --git a/test/fixtures/mastodon-problematic.xml b/test/fixtures/mastodon-problematic.xml
deleted file mode 100644
index a39e72759..000000000
--- a/test/fixtures/mastodon-problematic.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
- https://icosahedron.website/users/shel.atom
- shel🍖‼️
- Gay jackal dog, poet, future librarian.
-
-http://datapup.info
-avatar: @puppytube@twitter.com
- 2017-05-02T23:26:01Z
- https://icosahedron.website/system/accounts/avatars/000/001/207/original/b1e07b09ae1cc787.png?1493767561
-
- https://icosahedron.website/users/shel
- http://activitystrea.ms/schema/1.0/person
- https://icosahedron.website/users/shel
- shel
- shel@icosahedron.website
- <p>Gay jackal dog, poet, future librarian. </p><p><a href="http://datapup.info/" rel="nofollow noopener" target="_blank"><span class="invisible">http://</span><span class="">datapup.info/</span><span class="invisible"></span></a><br />avatar: @puppytube@twitter.com</p>
-
-
-
- shel
- shel🍖‼️
- Gay jackal dog, poet, future librarian.
-
-http://datapup.info
-avatar: @puppytube@twitter.com
- public
-
-
-
-
-
-
- tag:icosahedron.website,2017-05-10:objectId=1414013:objectType=Status
- 2017-05-10T17:16:24Z
- 2017-05-10T17:16:24Z
- shel shared a status by instance_names@cybre.space
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:cybre.space,2017-05-10:objectId=946671:objectType=Status
- 2017-05-10T17:15:51Z
- 2017-05-10T17:15:52Z
- New status by instance_names@cybre.space
-
- https://cybre.space/users/instance_names
- http://activitystrea.ms/schema/1.0/person
- https://cybre.space/users/instance_names
- instance_names
- instance_names@cybre.space
- <p>name ideas for your new mastodon instance. made by <span class="h-card"><a href="https://witches.town/@lycaon">@<span>lycaon</span></a></span> source available at <a href="https://github.com/LycaonIsAWolf/instance_names"><span class="invisible">https://</span><span class="ellipsis">github.com/LycaonIsAWolf/insta</span><span class="invisible">nce_names</span></a></p>
-
-
-
- instance_names
- instance names
- name ideas for your new mastodon instance. made by @lycaon source available at https://github.com/LycaonIsAWolf/instance_names
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>dildo.codes</p>
- unlisted
-
-
- <p>dildo.codes</p>
-
- public
-
-
-
-
diff --git a/test/fixtures/mastodon-question-activity.json b/test/fixtures/mastodon-question-activity.json
index ac329c7d5..3648b9f90 100644
--- a/test/fixtures/mastodon-question-activity.json
+++ b/test/fixtures/mastodon-question-activity.json
@@ -49,7 +49,6 @@
"en": "
Why is Tenshi eating a corndog so cute?
"
},
"endTime": "2019-05-11T09:03:36Z",
- "closed": "2019-05-11T09:03:36Z",
"attachment": [],
"tag": [],
"replies": {
diff --git a/test/fixtures/mastodon_conversation.xml b/test/fixtures/mastodon_conversation.xml
deleted file mode 100644
index 8faab2304..000000000
--- a/test/fixtures/mastodon_conversation.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- tag:mastodon.social,2017-08-28:objectId=16402826:objectType=Status
- 2017-08-28T17:58:55Z
- 2017-08-28T17:58:55Z
- New status by lambadalambda
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>test. <a href="https://mastodon.social/media/XCp0OHGPON9kWZwhjaI" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.social/media/XCp0OHGP</span><span class="invisible">ON9kWZwhjaI</span></a></p>
-
-
- public
-
-
-
-
diff --git a/test/fixtures/nil_mention_entry.xml b/test/fixtures/nil_mention_entry.xml
deleted file mode 100644
index e13024cb3..000000000
--- a/test/fixtures/nil_mention_entry.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- GNU social
- https://social.stopwatchingus-heidelberg.de/api/statuses/user_timeline/18330.atom
- atarifrosch timeline
- Updates from atarifrosch on social.stopwatchingus-heidelberg.de!
- https://social.stopwatchingus-heidelberg.de/avatar/18330-96-20150628163706.png
- 2017-08-24T11:36:49+02:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.stopwatchingus-heidelberg.de/user/18330
- atarifrosch
- Nerd, Pirat, Debian user, CAcert assurer, Geocacher, Freifunker. Autismus/Depression, agender. GnuPG Key-ID: 0xBCF81ADE
-
-
-
-
-
- atarifrosch
- Atari-Frosch
- Nerd, Pirat, Debian user, CAcert assurer, Geocacher, Freifunker. Autismus/Depression, agender. GnuPG Key-ID: 0xBCF81ADE
-
- Düsseldorf, NRW, Germany
-
-
- homepage
- https://www.atari-frosch.de/
- true
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978072:objectType=note
- New note by atarifrosch
- 2017-08-22 Bundesverfassungsgericht: Erfolgreiche Verfassungsbeschwerde gegen die Versagung vorläufiger Leistungen für Kosten der Unterkunft und Heizung – <a href="https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html" title="https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html" class="attachment" id="attachment-450768" rel="nofollow external">https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html</a> !<a href="http://quitter.se/group/2184/id" class="h-card group" title="HartzIV (hartziv)">hartziv</a>
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-22T12:00:21+00:00
- 2017-08-22T12:00:21+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978072:objectType=thread:crc32=28a35f44
-
-
-
-
-
-
-
-
diff --git a/test/fixtures/ostatus_incoming_post.xml b/test/fixtures/ostatus_incoming_post.xml
deleted file mode 100644
index 7967e1b32..000000000
--- a/test/fixtures/ostatus_incoming_post.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-04-29T18:25:38+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.heldscal.la,2017-04-29:noticeId=1967725:objectType=note
- New note by lambadalambda
- Will it blend?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T18:25:38+00:00
- 2017-04-29T18:25:38+00:00
-
- tag:social.heldscal.la,2017-04-29:objectType=thread:nonce=3f3a9dd83acc4e35
-
-
-
-
-
-
diff --git a/test/fixtures/ostatus_incoming_post_tag.xml b/test/fixtures/ostatus_incoming_post_tag.xml
deleted file mode 100644
index 0f99c4126..000000000
--- a/test/fixtures/ostatus_incoming_post_tag.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-04-29T18:25:38+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.heldscal.la,2017-04-29:noticeId=1967725:objectType=note
- New note by lambadalambda
- Will it blend?
-
-
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T18:25:38+00:00
- 2017-04-29T18:25:38+00:00
-
- tag:social.heldscal.la,2017-04-29:objectType=thread:nonce=3f3a9dd83acc4e35
-
-
-
-
-
-
diff --git a/test/fixtures/ostatus_incoming_reply.xml b/test/fixtures/ostatus_incoming_reply.xml
deleted file mode 100644
index 83a427a68..000000000
--- a/test/fixtures/ostatus_incoming_reply.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-04-30T09:30:32+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.heldscal.la,2017-04-30:noticeId=1978790:objectType=comment
- New comment by lambadalambda
- @<a href="https://gs.archae.me/user/4687" class="h-card u-url p-nickname mention" title="shpbot">shpbot</a> why not indeed.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-30T09:30:32+00:00
- 2017-04-30T09:30:32+00:00
-
-
-
- https://gs.archae.me/conversation/327120
-
-
-
-
-
-
-
diff --git a/test/fixtures/preload_static/instance/panel.html b/test/fixtures/preload_static/instance/panel.html
new file mode 100644
index 000000000..fc58e4e93
--- /dev/null
+++ b/test/fixtures/preload_static/instance/panel.html
@@ -0,0 +1 @@
+HEY!
diff --git a/test/fixtures/share-gs-local.xml b/test/fixtures/share-gs-local.xml
deleted file mode 100644
index 9d52eab7b..000000000
--- a/test/fixtures/share-gs-local.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-03T08:05:41+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-03:noticeId=2028428:objectType=note
- lambadalambda repeated a notice by lain
- RT @<a href="https://pleroma.soykaf.com/users/lain" class="h-card u-url p-nickname mention" title="Lain Iwakura">lain</a> Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- http://activitystrea.ms/schema/1.0/share
- 2017-05-03T08:05:41+00:00
- 2017-05-03T08:05:41+00:00
-
- http://activitystrea.ms/schema/1.0/activity
- LOCAL_ID
-
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-03T08:04:44+00:00
- 2017-05-03T08:04:44+00:00
-
- http://activitystrea.ms/schema/1.0/person
- LOCAL_USER
- lain
- Test account
-
-
-
-
-
- lain
- Lain Iwakura
- Test account
-
-
-
- http://activitystrea.ms/schema/1.0/note
- https://pleroma.soykaf.com/objects/4c1bda26-902e-4525-9fcd-b9fd44925193
- New note by lain
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
-
-
-
- https://pleroma.soykaf.com/contexts/ede39a2b-7cf3-4fa4-8ccd-cb97431bcc22
-
-
-
-
- https://pleroma.soykaf.com/contexts/ede39a2b-7cf3-4fa4-8ccd-cb97431bcc22
-
-
-
-
-
-
diff --git a/test/fixtures/share-gs.xml b/test/fixtures/share-gs.xml
deleted file mode 100644
index ab5e488bd..000000000
--- a/test/fixtures/share-gs.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
- GNU social
- https://social.heldscal.la/api/statuses/user_timeline/23211.atom
- lambadalambda timeline
- Updates from lambadalambda on social.heldscal.la!
- https://social.heldscal.la/avatar/23211-96-20170416114255.jpeg
- 2017-05-03T08:05:41+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- Call me Deacon Blues.
-
-
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
-
- Berlin
-
-
- homepage
- https://heldscal.la
- true
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.heldscal.la,2017-05-03:noticeId=2028428:objectType=note
- lambadalambda repeated a notice by lain
- RT @<a href="https://pleroma.soykaf.com/users/lain" class="h-card u-url p-nickname mention" title="Lain Iwakura">lain</a> Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- http://activitystrea.ms/schema/1.0/share
- 2017-05-03T08:05:41+00:00
- 2017-05-03T08:05:41+00:00
-
- http://activitystrea.ms/schema/1.0/activity
- https://pleroma.soykaf.com/objects/4c1bda26-902e-4525-9fcd-b9fd44925193
-
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-03T08:04:44+00:00
- 2017-05-03T08:04:44+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://pleroma.soykaf.com/users/lain
- lain
- Test account
-
-
-
-
-
- lain
- Lain Iwakura
- Test account
-
-
-
- http://activitystrea.ms/schema/1.0/note
- https://pleroma.soykaf.com/objects/4c1bda26-902e-4525-9fcd-b9fd44925193
- New note by lain
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
-
-
-
- https://pleroma.soykaf.com/contexts/ede39a2b-7cf3-4fa4-8ccd-cb97431bcc22
-
-
-
-
- https://pleroma.soykaf.com/contexts/ede39a2b-7cf3-4fa4-8ccd-cb97431bcc22
-
-
-
-
-
-
diff --git a/test/fixtures/share.xml b/test/fixtures/share.xml
deleted file mode 100644
index e07b88680..000000000
--- a/test/fixtures/share.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- tag:mastodon.social,2017-05-03:objectId=4934452:objectType=Status
- 2017-05-03T08:21:09Z
- 2017-05-03T08:21:09Z
- lambadalambda shared a status by lain@pleroma.soykaf.com
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- https://pleroma.soykaf.com/objects/4c1bda26-902e-4525-9fcd-b9fd44925193
- 2017-05-03T08:04:44Z
- 2017-05-03T08:05:52Z
- New status by lain@pleroma.soykaf.com
-
- https://pleroma.soykaf.com/users/lain
- http://activitystrea.ms/schema/1.0/person
- https://pleroma.soykaf.com/users/lain
- lain
- lain@pleroma.soykaf.com
- Test account
-
-
-
- lain
- Lain Iwakura
- Test account
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- public
-
-
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- public
-
-
-
diff --git a/test/fixtures/tesla_mock/7369654.atom b/test/fixtures/tesla_mock/7369654.atom
deleted file mode 100644
index 74fd9ce6b..000000000
--- a/test/fixtures/tesla_mock/7369654.atom
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:shitposter.club,2018-02-22:noticeId=7369654:objectType=comment
- New comment by shpuld
- @<a href="https://testing.pleroma.lol/users/lain" class="h-card mention" title="Rael Electric Razor">lain</a> me far right
-
-
- http://activitystrea.ms/schema/1.0/post
- 2018-02-22T09:20:12+00:00
- 2018-02-22T09:20:12+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://shitposter.club/user/5381
- shpuld
-
-
-
-
-
- shpuld
- shp
-
-
-
-
-
-
- tag:shitposter.club,2018-02-22:objectType=thread:nonce=e5a7c72d60a9c0e4
-
-
-
-
-
-
-
diff --git a/test/fixtures/tesla_mock/admin@mastdon.example.org.json b/test/fixtures/tesla_mock/admin@mastdon.example.org.json
index 9fdd6557c..a911b979a 100644
--- a/test/fixtures/tesla_mock/admin@mastdon.example.org.json
+++ b/test/fixtures/tesla_mock/admin@mastdon.example.org.json
@@ -26,6 +26,9 @@
"summary": "\u003cp\u003e\u003c/p\u003e",
"url": "http://mastodon.example.org/@admin",
"manuallyApprovesFollowers": false,
+ "capabilities": {
+ "acceptsChatMessages": true
+ },
"publicKey": {
"id": "http://mastodon.example.org/users/admin#main-key",
"owner": "http://mastodon.example.org/users/admin",
diff --git a/test/fixtures/tesla_mock/atarifrosch_feed.xml b/test/fixtures/tesla_mock/atarifrosch_feed.xml
deleted file mode 100644
index e00df782e..000000000
--- a/test/fixtures/tesla_mock/atarifrosch_feed.xml
+++ /dev/null
@@ -1,473 +0,0 @@
-
-
- GNU social
- https://social.stopwatchingus-heidelberg.de/api/statuses/user_timeline/18330.atom
- atarifrosch-Zeitleiste
- Aktualisierungen von atarifrosch auf social.stopwatchingus-heidelberg.de!
- https://social.stopwatchingus-heidelberg.de/avatar/18330-96-20150628163706.png
- 2017-08-24T12:06:55+02:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.stopwatchingus-heidelberg.de/user/18330
- atarifrosch
- Nerd, Pirat, Debian user, CAcert assurer, Geocacher, Freifunker. Autismus/Depression, agender. GnuPG Key-ID: 0xBCF81ADE
-
-
-
-
-
- atarifrosch
- Atari-Frosch
- Nerd, Pirat, Debian user, CAcert assurer, Geocacher, Freifunker. Autismus/Depression, agender. GnuPG Key-ID: 0xBCF81ADE
-
- Düsseldorf, NRW, Germany
-
-
- homepage
- https://www.atari-frosch.de/
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-24:noticeId=978735:objectType=note
- atarifrosch repeated a notice by hoergen
- RT @<a href="https://social.hoergen.org/hoergen" class="h-card mention" title="hoergen">hoergen</a> Das falsche Bild der Tagesschau "Auffallend "erfolgreich" - Andrea Nahles und Manuela Schwesig" #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/geringverdiener" rel="tag">Geringverdiener</a></span> #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/mindestlohn" rel="tag">Mindestlohn</a></span> #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/mannxismus" rel="tag">mannxismus</a></span> #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/erwerbsminderungsrente" rel="tag">Erwerbsminderungsrente</a></span> #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/arbeitnehmerflexibilisierung" rel="tag">ArbeitnehmerFlexibilisierung</a></span> #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/altersarmut" rel="tag">AltersArmut</a></span> ..... <a href="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" title="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" class="attachment" id="attachment-450858" rel="nofollow external">http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html</a>
- https://social.stopwatchingus-heidelberg.de/notice/978735
- http://activitystrea.ms/schema/1.0/share
- 2017-08-24T09:18:25+00:00
- 2017-08-24T09:18:25+00:00
-
- http://activitystrea.ms/schema/1.0/activity
- tag:social.hoergen.org,2017-08-24:noticeId=222320:objectType=note
-
- Das falsche Bild der Tagesschau <br /> "Auffallend "erfolgreich" - Andrea Nahles und Manuela Schwesig" #<span class="tag"><a href="https://social.hoergen.org/tag/geringverdiener" rel="tag">Geringverdiener</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/mindestlohn" rel="tag">Mindestlohn</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/mannxismus" rel="tag">mannxismus</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/erwerbsminderungsrente" rel="tag">Erwerbsminderungsrente</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/arbeitnehmerflexibilisierung" rel="tag">ArbeitnehmerFlexibilisierung</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/altersarmut" rel="tag">AltersArmut</a></span> ..... <br /> <br /> <a href="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" title="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" rel="nofollow external noreferrer" class="attachment">http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html</a>
- https://social.hoergen.org/notice/222320
- http://activitystrea.ms/schema/1.0/post
- 2017-08-24T07:36:31+00:00
- 2017-08-24T07:36:31+00:00
-
- http://activitystrea.ms/schema/1.0/person
- https://social.hoergen.org/user/2
- hoergen
- aka Andi Memyself #humanist #nerd Menschen liebhabender Misanthrop und auch sonst sehr vielseitig interessiert.
-
-
-
-
-
- hoergen
- hoergen
- aka Andi Memyself #humanist #nerd Menschen liebhabender Misanthrop und auch sonst sehr vielseitig interessiert.
-
- Berlin
-
-
- homepage
- https://hyperblog.de/hoergen/
- true
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.hoergen.org,2017-08-24:noticeId=222320:objectType=note
- New note by hoergen
- Das falsche Bild der Tagesschau <br /> "Auffallend "erfolgreich" - Andrea Nahles und Manuela Schwesig" #<span class="tag"><a href="https://social.hoergen.org/tag/geringverdiener" rel="tag">Geringverdiener</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/mindestlohn" rel="tag">Mindestlohn</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/mannxismus" rel="tag">mannxismus</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/erwerbsminderungsrente" rel="tag">Erwerbsminderungsrente</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/arbeitnehmerflexibilisierung" rel="tag">ArbeitnehmerFlexibilisierung</a></span> #<span class="tag"><a href="https://social.hoergen.org/tag/altersarmut" rel="tag">AltersArmut</a></span> ..... <br /> <br /> <a href="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" title="http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html" rel="nofollow external noreferrer" class="attachment">http://www.tagesschau.de/inland/btw17/bilanz-schwesig-nahles-101.html</a>
-
-
-
-
- https://social.hoergen.org/conversation/98616
-
-
-
-
-
-
-
-
-
-
- https://social.hoergen.org/conversation/98616
-
-
-
-
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.stopwatchingus-heidelberg.de,2017-08-24:noticeId=978734:objectType=comment
- New comment by atarifrosch
- Jo, die Anzahl der Hartz-IV-Sanktionen nennt sie genausowenig wie die Anzahl der Menschen, die von den Repressionsbehörden in Obdachlosigkeit und Suizid getrieben wurden. Das würde die Erfolgszahlen dann doch ein wenig trüben, nech?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-24T09:18:13+00:00
- 2017-08-24T09:18:13+00:00
-
-
-
- https://social.hoergen.org/conversation/98616
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-24:noticeId=978732:objectType=note
- New note by atarifrosch
- Moin-quak.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-24T09:09:39+00:00
- 2017-08-24T09:09:39+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-24:noticeId=978732:objectType=thread:crc32=2f92b7b6
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978594:objectType=note
- New note by atarifrosch
- n8-quak!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-23T21:39:54+00:00
- 2017-08-23T21:39:54+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978594:objectType=thread:crc32=9bdb0ac9
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978503:objectType=note
- New note by atarifrosch
- 2017-08-16 Michal Špaček: Post a boarding pass on Facebook, get your account stolen – Post a boarding pass on Facebook, get your account stolen (gilt übrinx nicht nur für Facebook)
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-23T15:14:29+00:00
- 2017-08-23T15:14:29+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978503:objectType=thread:crc32=3de05c3a
-
-
-
-
-
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:fave:18330:activity:978458:2017-08-23T15:18:19+02:00
- Favorite
- atarifrosch favorited something by einebiene: Haha, große Überraschung. <a href="http://www.sueddeutsche.de/wirtschaft/abgasaffaere-software-updates-fuer-dieselautos-helfen-kaum-1.3637636" title="http://www.sueddeutsche.de/wirtschaft/abgasaffaere-software-updates-fuer-dieselautos-helfen-kaum-1.3637636" rel="nofollow noreferrer" class="attachment">https://quitter.is/url/1122672</a><br /> Was ich an all diesen Artikeln schade finde, ist, daß immer nur auf den Umstieg von Auto zu anderem Auto gesprochen wird. Öffis werden nicht erwähnt, Carsharing nicht, radeln nicht, und in der Stadt wäre ne Vespa auch deutlich besser als ein SUV.
- http://activitystrea.ms/schema/1.0/favorite
- 2017-08-23T13:18:19+00:00
- 2017-08-23T13:18:19+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:quitter.is,2017-08-23:noticeId=4032910:objectType=note
- New note by einebiene
- Haha, große Überraschung. <a href="http://www.sueddeutsche.de/wirtschaft/abgasaffaere-software-updates-fuer-dieselautos-helfen-kaum-1.3637636" title="http://www.sueddeutsche.de/wirtschaft/abgasaffaere-software-updates-fuer-dieselautos-helfen-kaum-1.3637636" rel="nofollow noreferrer" class="attachment">https://quitter.is/url/1122672</a><br /> Was ich an all diesen Artikeln schade finde, ist, daß immer nur auf den Umstieg von Auto zu anderem Auto gesprochen wird. Öffis werden nicht erwähnt, Carsharing nicht, radeln nicht, und in der Stadt wäre ne Vespa auch deutlich besser als ein SUV.
-
-
-
-
-
-
- https://quitter.is/conversation/2535246
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978402:objectType=note
- New note by atarifrosch
- moin-quak
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-23T10:57:26+00:00
- 2017-08-23T10:57:26+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-23:noticeId=978402:objectType=thread:crc32=7050c397
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978164:objectType=note
- New note by atarifrosch
- n8-quak
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-22T19:54:30+00:00
- 2017-08-22T19:54:30+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978164:objectType=thread:crc32=b0a209c7
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978072:objectType=note
- New note by atarifrosch
- 2017-08-22 Bundesverfassungsgericht: Erfolgreiche Verfassungsbeschwerde gegen die Versagung vorläufiger Leistungen für Kosten der Unterkunft und Heizung – <a href="https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html" title="https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html" class="attachment" id="attachment-450768" rel="nofollow external">https://www.bundesverfassungsgericht.de/SharedDocs/Pressemitteilungen/DE/2017/bvg17-072.html</a> !<a href="http://quitter.se/group/2184/id" class="h-card group" title="HartzIV (hartziv)">hartziv</a>
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-22T12:00:21+00:00
- 2017-08-22T12:00:21+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978072:objectType=thread:crc32=28a35f44
-
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978042:objectType=note
- New note by atarifrosch
- moin-quak!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-22T07:55:27+00:00
- 2017-08-22T07:55:27+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-22:noticeId=978042:objectType=thread:crc32=f070a9f7
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-21:noticeId=977914:objectType=note
- New note by atarifrosch
- So, morgen geht's weiter. n8-quak!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-21T22:09:53+00:00
- 2017-08-21T22:09:53+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-21:noticeId=977914:objectType=thread:crc32=c0a9f7fa
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-21:noticeId=977710:objectType=note
- New note by atarifrosch
- moin-quak.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-21T08:58:26+00:00
- 2017-08-21T08:58:26+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-21:noticeId=977710:objectType=thread:crc32=60cfb466
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-20:noticeId=977526:objectType=note
- New note by atarifrosch
- Meine Augen meinen, für heute sei es genug. Nun denn. n8-quak.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-20T19:58:16+00:00
- 2017-08-20T19:58:16+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-20:noticeId=977526:objectType=thread:crc32=ce79634
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-20:noticeId=977369:objectType=note
- New note by atarifrosch
- [Blog] Im Netz aufgefischt #<span class="tag"><a href="https://social.stopwatchingus-heidelberg.de/tag/330" rel="tag">330</a></span> – <a href="https://blog.atari-frosch.de/2017/08/20/im-netz-aufgefischt-330/" title="https://blog.atari-frosch.de/2017/08/20/im-netz-aufgefischt-330/" class="attachment" id="attachment-450668" rel="nofollow external">https://blog.atari-frosch.de/2017/08/20/im-netz-aufgefischt-330/</a> (was ich diese Woche so gelesen habe)
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-20T09:14:07+00:00
- 2017-08-20T09:14:07+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-20:noticeId=977369:objectType=thread:crc32=2f800b86
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=977268:objectType=note
- New note by atarifrosch
- Fast ständig husten müssen ist echt anstrengend … naja, n8-quak.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-19T21:59:20+00:00
- 2017-08-19T21:59:20+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=977268:objectType=thread:crc32=deda767a
-
-
-
-
-
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:fave:18330:activity:977146:2017-08-19T21:39:26+02:00
- Favorite
- atarifrosch favorited something by einebienezwo: Ich mach gerade Kompetenztraining.<br /> Ich trainiere die Kompetenz, eine halb aufgegessene Gummibärchentüte nicht ganz aufzuessen.
- http://activitystrea.ms/schema/1.0/favorite
- 2017-08-19T19:39:26+00:00
- 2017-08-19T19:39:26+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:gnusocial.de,2017-08-19:noticeId=11011264:objectType=note
- New note by einebienezwo
- Ich mach gerade Kompetenztraining.<br /> Ich trainiere die Kompetenz, eine halb aufgegessene Gummibärchentüte nicht ganz aufzuessen.
-
-
-
-
-
-
- https://gnusocial.de/conversation/9363945
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=977242:objectType=comment
- New comment by atarifrosch
- Wir hatten hier schon Ordnungsdienst auf'm Radweg. Fotografisch dokumentiert (nicht von mir, Bekannter hatte es gesehen). Da hatte grad 'ne Pizzeria neu eröffnet …
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-19T19:38:53+00:00
- 2017-08-19T19:38:53+00:00
-
-
-
- https://gnusocial.de/conversation/9363813
-
-
-
-
-
-
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:fave:18330:activity:977180:2017-08-19T21:37:36+02:00
- Favorite
- atarifrosch favorited something by jcaktiv: BTW Hallo zusammen <3, wo ich schon mal wieder hier bin
- http://activitystrea.ms/schema/1.0/favorite
- 2017-08-19T19:37:36+00:00
- 2017-08-19T19:37:36+00:00
-
- http://activitystrea.ms/schema/1.0/note
- tag:quitter.se,2017-08-19:noticeId=17372467:objectType=note
- New note by jcaktiv
- BTW Hallo zusammen <3, wo ich schon mal wieder hier bin
-
-
-
-
-
-
- tag:quitter.se,2017-08-19:objectType=thread:nonce=46c1c433d88aaa9f
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/comment
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=976985:objectType=comment
- New comment by atarifrosch
- Jo, oder einfach mal nachfragen, so als Realitätsabgleich.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-19T10:34:50+00:00
- 2017-08-19T10:34:50+00:00
-
-
-
- https://gnusocial.de/conversation/9362516
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=976983:objectType=note
- New note by atarifrosch
- Schöne Alternative zu mit Werbung überladenen kommerziellen Anbietern: <a href="http://ifconfig.at/" title="http://ifconfig.at/" class="attachment" id="attachment-450636" rel="nofollow external">http://ifconfig.at/</a> – eigene IP, Hostname etc. abfragen, mit curl dann auch in Textform zur lokalen Weiterverarbeitung in Scripten etc. Leider (noch?) kein https.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-08-19T10:33:04+00:00
- 2017-08-19T10:33:04+00:00
-
- tag:social.stopwatchingus-heidelberg.de,2017-08-19:noticeId=976983:objectType=thread:crc32=4a3593c0
-
-
-
-
-
-
diff --git a/test/fixtures/tesla_mock/baptiste.gelex.xyz-article.json b/test/fixtures/tesla_mock/baptiste.gelex.xyz-article.json
index 3f3f0f4fb..b76ba96a5 100644
--- a/test/fixtures/tesla_mock/baptiste.gelex.xyz-article.json
+++ b/test/fixtures/tesla_mock/baptiste.gelex.xyz-article.json
@@ -1 +1,227 @@
-{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"Emoji":"toot:Emoji","Hashtag":"as:Hashtag","atomUri":"ostatus:atomUri","conversation":"ostatus:conversation","featured":"toot:featured","focalPoint":{"@container":"@list","@id":"toot:focalPoint"},"inReplyToAtomUri":"ostatus:inReplyToAtomUri","manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":"as:movedTo","ostatus":"http://ostatus.org#","sensitive":"as:sensitive","toot":"http://joinmastodon.org/ns#"}],"attributedTo":["https://baptiste.gelez.xyz/@/BaptisteGelez"],"cc":[],"content":"
It has been one month since the last \"This Month in Plume\" article, so it is time for another edition of our monthly changelog!
\n
Bug Fixes and Security
\n
Let's start with the hidden, but still (very) important changes: bug fixes and security patches.
\n
First of all, @Trinity protected us against two major security flaws, called XSS and CSRF. The first one allows the attacker to run malicious code if you visit a Plume page where some of their personal data is present. The second one lets them post data with your Plume account by visiting one of their own website. It is two very common attack, and it is great we are now protected against them!
\n
The other big change in this area, is that we are now validating the data you are sending before doing anything with it. It means that, for instance, you will no longer be able to register with an empty username and to break everything.
\n
On the federation side, many issues were reported by @kaniini and redmatrix (respectively contributing to Pleroma and Hubzilla). By fixing some of them, we made it possible to federate Plume articles to Pleroma!
\n
@Trinity hopefully noticed that there was a bug in our password check code: we were not checking that your password was correct, but only that the verification process went without errors. Concretely, it means that you could login to any account with any password. I wrote this part of the code when I was still the only contributor to the project, so nobody could review my work. We will now be trying to check every change, especially when it deals with critical parts of Plume, to avoid similar issues in the future, and we I'm really sorry this happened (even if I think nobody exploited it).
\n
Zanfib and stephenburgess8 also commited some small bugfixes, improving the general experience.
\n
New Features
\n
Let's now talk about the features that we introduced during this month.
\n
One of the most easy to spot is the redesign of Plume, made by @Madeorsk. I personaly love what he did, it really improved the readability and gave Plume a bit more of identity than the previous design. And he is still improving it.
\n
We also enabled Mardown in comment, to let you write more structured and nicely formatted responses.
\n
As you may have noticed, I have used mentions in this post. Indeed, it is now possible to mention someone in your articles or in comments. It works exactly the same way as in other apps, and you should receive a notification if someone mentionned you.
\n
A dashboard to manage your blogs has also been introduced. In the future it may be used to manage your drafts, and eventually to show some statistics. The goal is to have a more specific homepage for authors.
\n
The federation with other ActivityPub softwares, like Mastodon or Pleroma is starting to work quite well, but the federation between Plume instances is far from being complete. However, we started to work on it, and it is now possible to view a distant user profile or blog from your instance, even if only basic informations are fetched yet (the articles are not loaded for instance).
\n
Another new feature that may not be visible for everyone, is the new NodeInfo endpoint. NodeInfo is a protocol allowing to get informations about a specific federated instance (whatever software it runs). It means that Plume instances can now be listed on sites like fediverse.network.
\n
Maybe you wanted to host a Plume instance, but you don't like long install process during which you are just copy/pasting commands that you don't really understand from the documentation. That's why we introduced a setup script: the first you'll launch Plume, it will ask you a few questions and automatically setup your instance in a few minutes. We hope that this feature will help to host small instances, run by non-professional adminsys. You can see a demo of this tool on asciinema.
\n
Last but not least, Plume is now translatable! It is already available in English, French, Polish (thanks to @m4sk1n)) and German (thanks to bitkeks). If your browser is configured to display pages in these languages, you should normally see the interface in your language. And if your language is not present yet, feel free to add your translation.
\n
Other Changes
\n
We also improved the code a lot. We tried to separate each part as much as possible, making it easier to re-use for other projects. For instance, our database code is now isolated from the rest of the app, which means it will be easier to make import tools from other blogging engines. Some parts of the code are even shared with another project, Aardwolf a federated Facebook alternative. For instance, both of our projects use the same internationalization code, and once Aardwolf will implement federation, this part of the code will probably be shared too. Since the WebFinger module (used to find new users and blogs) and the CSRF protection code (see the \"Bug fixes and Security\" section) have been isolated in their own modules, they may be shared by both projects too.
\n
We also worked a lot on documentation. We now have articles explaining how to setup your Plume instance on various operating systems, but also documenting the translation process. I want to thank BanjoFox (who imported some documentation from their project, Aardwolf, as the setup is quite similar), Kushal and @gled@plume.mastodon.host for working on this.
\n
As you can see, there were many changes this month, but there still a lot to do. Your help will of course be welcome. If you want to contribute to the code, translate Plume in your language, write some documentation, or anything else (or even if you're just curious about the project), feel free to join our Matrix room: #plume:disroot.org. Otherwise, as BanjoFoxsaid on the Aardwolf Team Mastodon account, talking about the project around you is one of the easiest way to help.
It has been one month since the last \"This Month in Plume\" article, so it is time for another edition of our monthly changelog!
\n
Bug Fixes and Security
\n
Let's start with the hidden, but still (very) important changes: bug fixes and security patches.
\n
First of all, @Trinity protected us against two major security flaws, called XSS and CSRF. The first one allows the attacker to run malicious code if you visit a Plume page where some of their personal data is present. The second one lets them post data with your Plume account by visiting one of their own website. It is two very common attack, and it is great we are now protected against them!
\n
The other big change in this area, is that we are now validating the data you are sending before doing anything with it. It means that, for instance, you will no longer be able to register with an empty username and to break everything.
\n
On the federation side, many issues were reported by @kaniini and redmatrix (respectively contributing to Pleroma and Hubzilla). By fixing some of them, we made it possible to federate Plume articles to Pleroma!
\n
@Trinity hopefully noticed that there was a bug in our password check code: we were not checking that your password was correct, but only that the verification process went without errors. Concretely, it means that you could login to any account with any password. I wrote this part of the code when I was still the only contributor to the project, so nobody could review my work. We will now be trying to check every change, especially when it deals with critical parts of Plume, to avoid similar issues in the future, and we I'm really sorry this happened (even if I think nobody exploited it).
\n
Zanfib and stephenburgess8 also commited some small bugfixes, improving the general experience.
\n
New Features
\n
Let's now talk about the features that we introduced during this month.
\n
One of the most easy to spot is the redesign of Plume, made by @Madeorsk. I personaly love what he did, it really improved the readability and gave Plume a bit more of identity than the previous design. And he is still improving it.
\n
We also enabled Mardown in comment, to let you write more structured and nicely formatted responses.
\n
As you may have noticed, I have used mentions in this post. Indeed, it is now possible to mention someone in your articles or in comments. It works exactly the same way as in other apps, and you should receive a notification if someone mentionned you.
\n
A dashboard to manage your blogs has also been introduced. In the future it may be used to manage your drafts, and eventually to show some statistics. The goal is to have a more specific homepage for authors.
\n
The federation with other ActivityPub softwares, like Mastodon or Pleroma is starting to work quite well, but the federation between Plume instances is far from being complete. However, we started to work on it, and it is now possible to view a distant user profile or blog from your instance, even if only basic informations are fetched yet (the articles are not loaded for instance).
\n
Another new feature that may not be visible for everyone, is the new NodeInfo endpoint. NodeInfo is a protocol allowing to get informations about a specific federated instance (whatever software it runs). It means that Plume instances can now be listed on sites like fediverse.network.
\n
Maybe you wanted to host a Plume instance, but you don't like long install process during which you are just copy/pasting commands that you don't really understand from the documentation. That's why we introduced a setup script: the first you'll launch Plume, it will ask you a few questions and automatically setup your instance in a few minutes. We hope that this feature will help to host small instances, run by non-professional adminsys. You can see a demo of this tool on asciinema.
\n
Last but not least, Plume is now translatable! It is already available in English, French, Polish (thanks to @m4sk1n)) and German (thanks to bitkeks). If your browser is configured to display pages in these languages, you should normally see the interface in your language. And if your language is not present yet, feel free to add your translation.
\n
Other Changes
\n
We also improved the code a lot. We tried to separate each part as much as possible, making it easier to re-use for other projects. For instance, our database code is now isolated from the rest of the app, which means it will be easier to make import tools from other blogging engines. Some parts of the code are even shared with another project, Aardwolf a federated Facebook alternative. For instance, both of our projects use the same internationalization code, and once Aardwolf will implement federation, this part of the code will probably be shared too. Since the WebFinger module (used to find new users and blogs) and the CSRF protection code (see the \"Bug fixes and Security\" section) have been isolated in their own modules, they may be shared by both projects too.
\n
We also worked a lot on documentation. We now have articles explaining how to setup your Plume instance on various operating systems, but also documenting the translation process. I want to thank BanjoFox (who imported some documentation from their project, Aardwolf, as the setup is quite similar), Kushal and @gled@plume.mastodon.host for working on this.
\n
As you can see, there were many changes this month, but there still a lot to do. Your help will of course be welcome. If you want to contribute to the code, translate Plume in your language, write some documentation, or anything else (or even if you're just curious about the project), feel free to join our Matrix room: #plume:disroot.org. Otherwise, as BanjoFoxsaid on the Aardwolf Team Mastodon account, talking about the project around you is one of the easiest way to help.
\n",
+ "id" : "https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/",
+ "likes" : null,
+ "name" : "This Month in Plume: June 2018",
+ "published" : "2018-07-10T20:16:24.087622Z",
+ "shares" : null,
+ "source" : null,
+ "tag" : [
+ {
+ "href" : "https://baptiste.gelez.xyz/@/Trinity",
+ "name" : "@Trinity",
+ "type" : "Mention"
+ },
+ {
+ "href" : "https://baptiste.gelez.xyz/@/kaniini/",
+ "name" : "@kaniini",
+ "type" : "Mention"
+ },
+ {
+ "href" : "https://baptiste.gelez.xyz/@/Trinity",
+ "name" : "@Trinity",
+ "type" : "Mention"
+ }
+ ],
+ "to" : [
+ "https://unixcorn.xyz/users/Bat",
+ "https://mastodon.host/users/federationbot",
+ "https://social.tcit.fr/users/tcit",
+ "https://framapiaf.org/users/qwerty",
+ "https://mastodon.social/users/lthms",
+ "https://eldritch.cafe/users/Nausicaa",
+ "https://imaginair.es/users/Elanndelh",
+ "https://framapiaf.org/users/Drulac",
+ "https://mastodon.partipirate.org/users/NicolasConstant",
+ "https://aleph.land/users/Madeorsk",
+ "https://maly.io/users/Troll",
+ "https://hostux.social/users/superjey",
+ "https://mamot.fr/users/Phigger",
+ "https://mastodon.social/users/wakest",
+ "https://social.coop/users/wakest",
+ "https://unixcorn.xyz/users/Ce_lo",
+ "https://social.art-software.fr/users/Electron",
+ "https://framapiaf.org/users/Quenti",
+ "https://toot.plus.yt/users/Djyp",
+ "https://mastodon.social/users/brainblasted",
+ "https://social.mochi.academy/users/Ambraven",
+ "https://social.hacktivis.me/users/lanodan",
+ "https://mastodon.eliotberriot.com/users/eliotberriot",
+ "https://edolas.world/users/0x1C3B00DA",
+ "https://toot.cafe/users/zack",
+ "https://manowar.social/users/zatnosk",
+ "https://eldritch.cafe/users/fluffy",
+ "https://mastodon.social/users/david_ross",
+ "https://kosmos.social/users/xiroux",
+ "https://mastodon.art/users/EmergencyBattle",
+ "https://mastodon.social/users/trwnh",
+ "https://octodon.social/users/pybyte",
+ "https://anticapitalist.party/users/Trinity",
+ "https://mstdn.mx/users/xavavu",
+ "https://baptiste.gelez.xyz/@/m4sk1n",
+ "https://eldritch.cafe/users/milia",
+ "https://mastodon.zaclys.com/users/arx",
+ "https://toot.cafe/users/sivy",
+ "https://mastodon.social/users/ortegacmanuel",
+ "https://mastodon.observer/users/stephen",
+ "https://octodon.social/users/chloe",
+ "https://unixcorn.xyz/users/AmauryPi",
+ "https://cybre.space/users/rick_777",
+ "https://mastodon.social/users/wezm",
+ "https://baptiste.gelez.xyz/@/idlesong",
+ "https://mamot.fr/users/dr4Ke",
+ "https://imaginair.es/users/Phigger",
+ "https://mamot.fr/users/dlink",
+ "https://anticapitalist.party/users/a000d4f7a91939d0e71df1646d7a48",
+ "https://framapiaf.org/users/PhieLaidMignon",
+ "https://mastodon.social/users/y6nH",
+ "https://crazynoisybizarre.town/users/FederationBot",
+ "https://social.weho.st/users/dvn",
+ "https://mastodon.art/users/Wolthera",
+ "https://diaspodon.fr/users/dada",
+ "https://pachyder.me/users/Lanza",
+ "https://mastodon.xyz/users/ag",
+ "https://aleph.land/users/yahananxie",
+ "https://mstdn.io/users/chablis_social",
+ "https://mastodon.gougere.fr/users/fabien",
+ "https://functional.cafe/users/otini",
+ "https://social.coop/users/bhaugen",
+ "https://octodon.social/users/donblanco",
+ "https://chaos.social/users/astro",
+ "https://pachyder.me/users/sibear",
+ "https://mamot.fr/users/yohann",
+ "https://social.wxcafe.net/users/Bat",
+ "https://mastodon.social/users/dansup",
+ "https://chaos.social/users/juh",
+ "https://scifi.fyi/users/paeneultima",
+ "https://hostux.social/users/Deuchnord",
+ "https://mstdn.fr/users/taziden",
+ "https://mamot.fr/users/PifyZ",
+ "https://mastodon.social/users/plantabaja",
+ "https://mastodon.social/users/gitzgrog",
+ "https://mastodon.social/users/Syluban",
+ "https://masto.pt/users/eloisa",
+ "https://pleroma.soykaf.com/users/notclacke",
+ "https://mastodon.social/users/SiegfriedEhret",
+ "https://writing.exchange/users/write_as",
+ "https://mstdn.io/users/shellkr",
+ "https://mastodon.uy/users/jorge",
+ "https://mastodon.technology/users/bobstechsite",
+ "https://mastodon.social/users/hinterwaeldler",
+ "https://mastodon.xyz/users/mgdelacroix",
+ "https://mastodon.cloud/users/jjatria",
+ "https://baptiste.gelez.xyz/@/Jade/",
+ "https://edolas.world/users/pfm",
+ "https://mstdn.io/users/jort",
+ "https://mastodon.social/users/andreipetcu",
+ "https://mastodon.technology/users/0xf00fc7c8",
+ "https://mastodon.social/users/khanate",
+ "https://mastodon.technology/users/francois",
+ "https://mastodon.social/users/glherrmann",
+ "https://mastodon.host/users/gled",
+ "https://social.holdmybeer.solutions/users/kemonine",
+ "https://scholar.social/users/bgcarlisle",
+ "https://mastodon.social/users/oldgun",
+ "https://baptiste.gelez.xyz/@/snoe/",
+ "https://mastodon.at/users/switchingsocial",
+ "https://scifi.fyi/users/BrokenBiscuit",
+ "https://dev.glitch.social/users/hoodie",
+ "https://todon.nl/users/paulfree14",
+ "https://mastodon.social/users/aadilayub",
+ "https://social.fsck.club/users/anarchosaurus",
+ "https://mastodonten.de/users/GiantG",
+ "https://mastodon.technology/users/cj",
+ "https://cybre.space/users/sam",
+ "https://layer8.space/users/silkevicious",
+ "https://mastodon.xyz/users/Jimmyrwx",
+ "https://fosstodon.org/users/danyspin97",
+ "https://mstdn.io/users/cristhyano",
+ "https://mastodon.social/users/vanyok",
+ "https://hulvr.com/users/rook",
+ "https://niu.moe/users/Lucifer",
+ "https://mamot.fr/users/Thibaut",
+ "https://mastodont.cat/users/bgta",
+ "https://mstdn.io/users/hontoni",
+ "https://niu.moe/users/lionirdeadman",
+ "https://functional.cafe/users/phoe",
+ "https://mastodon.social/users/toontoet",
+ "https://mastodon.social/users/danipozo",
+ "https://scholar.social/users/robertson",
+ "https://mastodon.social/users/aldatsa",
+ "https://elekk.xyz/users/maloki",
+ "https://kitty.town/users/nursemchurt",
+ "https://neigh.horse/users/commagray",
+ "https://mastodon.social/users/hirojin",
+ "https://mastodon.xyz/users/mareklach",
+ "https://chaos.social/users/benthor",
+ "https://mastodon.social/users/djperreault",
+ "https://mastodon.art/users/eylul",
+ "https://mastodon.opportunis.me/users/bob",
+ "https://tootplanet.space/users/Shutsumon",
+ "https://toot.cat/users/woozle",
+ "https://mastodon.social/users/StephenLB",
+ "https://sleeping.town/users/oct2pus",
+ "https://mastodon.indie.host/users/stragu",
+ "https://social.coop/users/gilscottfitzgerald",
+ "https://icosahedron.website/users/joeld",
+ "https://mastodon.social/users/hellion",
+ "https://cybre.space/users/cooler_ranch",
+ "https://mastodon.social/users/kelsonv",
+ "https://mastodon.lat/users/scalpol",
+ "https://writing.exchange/users/hnb",
+ "https://hex.bz/users/Horst",
+ "https://mastodon.social/users/weddle",
+ "https://maly.io/users/sonya",
+ "https://social.coop/users/medusa",
+ "https://mastodon.social/users/DystopianK",
+ "https://mstdn.io/users/d_io",
+ "https://fosstodon.org/users/brandon",
+ "https://fosstodon.org/users/Cando",
+ "https://mastodon.host/users/panina",
+ "https://floss.social/users/tuxether",
+ "https://social.tchncs.de/users/suitbertmonz",
+ "https://mastodon.social/users/jrt",
+ "https://mastodon.social/users/sirikon",
+ "https://mstdn.io/users/yabirgb",
+ "https://mastodon.cloud/users/FerdiZ",
+ "https://mastodon.social/users/carlchenet",
+ "https://social.polonkai.eu/users/calendar_social",
+ "https://social.polonkai.eu/users/gergely",
+ "https://mastodon.social/users/Jelv",
+ "https://mastodon.social/users/srinicame",
+ "https://cybre.space/users/mastoabed",
+ "https://mastodon.social/users/tagomago",
+ "https://lgbt.io/users/bootblackCub",
+ "https://niu.moe/users/Nopplyy",
+ "https://mastodon.social/users/bpugh",
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "type" : "Article",
+ "uploadMedia" : null,
+ "url" : "https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/"
+}
diff --git a/test/fixtures/tesla_mock/dist/test.txt b/test/fixtures/tesla_mock/dist/test.txt
new file mode 100644
index 000000000..e9ea42a12
--- /dev/null
+++ b/test/fixtures/tesla_mock/dist/test.txt
@@ -0,0 +1 @@
+this is a text file
diff --git a/test/fixtures/tesla_mock/emelie.atom b/test/fixtures/tesla_mock/emelie.atom
deleted file mode 100644
index ddaa1c6ca..000000000
--- a/test/fixtures/tesla_mock/emelie.atom
+++ /dev/null
@@ -1,306 +0,0 @@
-
-
- https://mastodon.social/users/emelie.atom
- emelie 🎨
- 23 / #Sweden / #Artist / #Equestrian / #GameDev
-
-If I ain't spending time with my pets, I'm probably drawing. 🐴 🐱 🐰
- 2019-02-04T20:22:19Z
- https://files.mastodon.social/accounts/avatars/000/015/657/original/e7163f98280da1a4.png
-
- https://mastodon.social/users/emelie
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/emelie
- emelie
- emelie@mastodon.social
- <p>23 / <a href="https://mastodon.social/tags/sweden" class="mention hashtag" rel="tag">#<span>Sweden</span></a> / <a href="https://mastodon.social/tags/artist" class="mention hashtag" rel="tag">#<span>Artist</span></a> / <a href="https://mastodon.social/tags/equestrian" class="mention hashtag" rel="tag">#<span>Equestrian</span></a> / <a href="https://mastodon.social/tags/gamedev" class="mention hashtag" rel="tag">#<span>GameDev</span></a></p><p>If I ain't spending time with my pets, I'm probably drawing. 🐴 🐱 🐰</p>
-
-
-
- emelie
- emelie 🎨
- 23 / #Sweden / #Artist / #Equestrian / #GameDev
-
-If I ain't spending time with my pets, I'm probably drawing. 🐴 🐱 🐰
- public
-
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101850331907006641
- 2019-04-01T09:58:50Z
- 2019-04-01T09:58:50Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>Me: I'm going to make this vital change to my world building in the morning, no way I'll forget this, it's too big of a deal<br />Also me: forgets</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101849626603073336
- 2019-04-01T06:59:28Z
- 2019-04-01T06:59:28Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
-
- <p><span class="h-card"><a href="https://mastodon.social/@Fergant" class="u-url mention">@<span>Fergant</span></a></span> Dom är i stort sett religiös skrift vid det här laget 👏👏</p><p>har dock bara läst svenska översättningen, kanske är dags att jag läser dom på engelska</p>
-
-
- public
-
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101849580030237068
- 2019-04-01T06:47:37Z
- 2019-04-01T06:47:37Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>What's you people's favourite fantasy books? Give me some hot tips 🌞</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101849550599949363
- 2019-04-01T06:40:08Z
- 2019-04-01T06:40:08Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>Stick them legs out 💃 <a href="https://mastodon.social/tags/mastocats" class="mention hashtag" rel="tag">#<span>mastocats</span></a></p>
-
-
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101849191533152720
- 2019-04-01T05:08:49Z
- 2019-04-01T05:08:49Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>long 🐱 <a href="https://mastodon.social/tags/mastocats" class="mention hashtag" rel="tag">#<span>mastocats</span></a></p>
-
-
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101849165031453009
- 2019-04-01T05:02:05Z
- 2019-04-01T05:02:05Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>You gotta take whatever bellyrubbing opportunity you can get before she changes her mind 🦁 <a href="https://mastodon.social/tags/mastocats" class="mention hashtag" rel="tag">#<span>mastocats</span></a></p>
-
-
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101846512530748693
- 2019-03-31T17:47:31Z
- 2019-03-31T17:47:31Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>Hello look at this boy having a decent haircut for once <a href="https://mastodon.social/tags/mastohorses" class="mention hashtag" rel="tag">#<span>mastohorses</span></a> <a href="https://mastodon.social/tags/equestrian" class="mention hashtag" rel="tag">#<span>equestrian</span></a></p>
-
-
-
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101846181093805500
- 2019-03-31T16:23:14Z
- 2019-03-31T16:23:14Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>Sorry did I disturb the who-is-the-longest-cat competition ? <a href="https://mastodon.social/tags/mastocats" class="mention hashtag" rel="tag">#<span>mastocats</span></a></p>
-
-
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101845897513133849
- 2019-03-31T15:11:07Z
- 2019-03-31T15:11:07Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- more earthsea ramblings
- <p>I'm re-watching Tales from Earthsea for the first time since I read the books, and that Therru doesn't squash Cob like a spider, as Orm Embar did is a wasted opportunity tbh</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101841219051533307
- 2019-03-30T19:21:19Z
- 2019-03-30T19:21:19Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>I gave my cats some mackerel and they ate it all in 0.3 seconds, and now they won't stop meowing for more, and I'm tired plz shut up</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101839949762341381
- 2019-03-30T13:58:31Z
- 2019-03-30T13:58:31Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
-
- <p>yet I'm confused about this american dude with a gun, like the heck r ya doin in mah ghibli</p>
-
- public
-
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101839928677863590
- 2019-03-30T13:53:09Z
- 2019-03-30T13:53:09Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>2 hours into Ni no Kuni 2 and I've already sold my soul to this game</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101836329521599438
- 2019-03-29T22:37:51Z
- 2019-03-29T22:37:51Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>Pippi Longstocking the original one-punch /man</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101835905282948341
- 2019-03-29T20:49:57Z
- 2019-03-29T20:49:57Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>I've had so much wine I thought I had a 3rd brother</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101835878059204660
- 2019-03-29T20:43:02Z
- 2019-03-29T20:43:02Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
-
- <p>ååååhhh booi</p>
-
- public
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101835848050598939
- 2019-03-29T20:35:24Z
- 2019-03-29T20:35:24Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
-
- <p><span class="h-card"><a href="https://thraeryn.net/@thraeryn" class="u-url mention">@<span>thraeryn</span></a></span> if I spent 1 hour and a half watching this monstrosity, I need to</p>
-
-
- public
-
-
-
-
-
-
- https://mastodon.social/users/emelie/statuses/101835823138262290
- 2019-03-29T20:29:04Z
- 2019-03-29T20:29:04Z
- New status by emelie
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
-
- medical, fluids mention
- <p><span class="h-card"><a href="https://icosahedron.website/@Trev" class="u-url mention">@<span>Trev</span></a></span> *hugs* ✨</p>
-
-
- public
-
-
-
-
-
-
diff --git a/test/fixtures/tesla_mock/framatube.org-video.json b/test/fixtures/tesla_mock/framatube.org-video.json
new file mode 100644
index 000000000..3d53f0c97
--- /dev/null
+++ b/test/fixtures/tesla_mock/framatube.org-video.json
@@ -0,0 +1 @@
+{"type":"Video","id":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206","name":"Déframasoftisons Internet [Framasoft]","duration":"PT3622S","uuid":"6050732a-8a7a-43d4-a6cd-809525a1d206","tag":[{"type":"Hashtag","name":"déframasoftisons"},{"type":"Hashtag","name":"EPN23"},{"type":"Hashtag","name":"framaconf"},{"type":"Hashtag","name":"Framasoft"},{"type":"Hashtag","name":"pyg"}],"category":{"identifier":"15","name":"Science & Technology"},"views":122,"sensitive":false,"waitTranscoding":false,"state":1,"commentsEnabled":true,"downloadEnabled":true,"published":"2020-05-24T18:34:31.569Z","originallyPublishedAt":"2019-11-30T23:00:00.000Z","updated":"2020-07-05T09:01:01.720Z","mediaType":"text/markdown","content":"Après avoir mené avec un certain succès la campagne « Dégooglisons Internet » en 2014, l’association Framasoft annonce fin 2019 arrêter progressivement un certain nombre de ses services alternatifs aux GAFAM. Pourquoi ?\r\n\r\nTranscription par @april...","support":null,"subtitleLanguage":[],"icon":{"type":"Image","url":"https://framatube.org/static/thumbnails/6050732a-8a7a-43d4-a6cd-809525a1d206.jpg","mediaType":"image/jpeg","width":223,"height":122},"url":[{"type":"Link","mediaType":"text/html","href":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206"},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4","height":1080,"size":1157359410,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309939","height":1080,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-1080.torrent","height":1080},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080.torrent&xt=urn:btih:381c9429900552e23a4eb506318f1fa01e4d63a8&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4&ws=https%3A%2F%2Fpeertube.iselfhost.com%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4&ws=https%3A%2F%2Ftube.privacytools.io%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080.mp4","height":1080},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-480.mp4","height":480,"size":250095131,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309941","height":480,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-480.torrent","height":480},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480.torrent&xt=urn:btih:a181dcbb5368ab5c31cc9ff07634becb72c344ee&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480.mp4&ws=https%3A%2F%2Fpeertube.iselfhost.com%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480.mp4&ws=https%3A%2F%2Ftube.privacytools.io%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480.mp4","height":480},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-360.mp4","height":360,"size":171357733,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309942","height":360,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-360.torrent","height":360},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360.torrent&xt=urn:btih:aedfa9479ea04a175eee0b0bd0bda64076308746&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360.mp4&ws=https%3A%2F%2Fpeertube.iselfhost.com%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360.mp4&ws=https%3A%2F%2Ftube.privacytools.io%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360.mp4","height":360},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-720.mp4","height":720,"size":497100839,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309943","height":720,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-720.torrent","height":720},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720.torrent&xt=urn:btih:71971668f82a3b24ac71bc3a982848dd8dc5a5f5&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720.mp4&ws=https%3A%2F%2Fpeertube.iselfhost.com%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720.mp4&ws=https%3A%2F%2Ftube.privacytools.io%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720.mp4&ws=https%3A%2F%2Fpeertube.live%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720.mp4","height":720},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/webseed/6050732a-8a7a-43d4-a6cd-809525a1d206-240.mp4","height":240,"size":113038439,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309944","height":240,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-240.torrent","height":240},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240.torrent&xt=urn:btih:c42aa6c95efb28d9f114ebd98537f7b00fa72246&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240.mp4&ws=https%3A%2F%2Fpeertube.iselfhost.com%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240.mp4&ws=https%3A%2F%2Ftube.privacytools.io%2Fstatic%2Fredundancy%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240.mp4","height":240},{"type":"Link","mediaType":"application/x-mpegURL","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/master.m3u8","tag":[{"type":"Infohash","name":"f7428214539626e062f300f2ca4cf9154575144e"},{"type":"Infohash","name":"46e236dffb1ea6b9123a5396cbe88e97dd94cc6c"},{"type":"Infohash","name":"11f1045830b5d786c788f2594d19f128764e7d87"},{"type":"Infohash","name":"4327ad3e0d84de100130a27e9ab6fe40c4284f0e"},{"type":"Infohash","name":"41e2eee8e7b23a63c23a77c40a46de11492a4831"},{"type":"Link","name":"sha256","mediaType":"application/json","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/segments-sha256.json"},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/6050732a-8a7a-43d4-a6cd-809525a1d206-1080-fragmented.mp4","height":1080,"size":1156777472,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309940","height":1080,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-1080-hls.torrent","height":1080},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080-hls.torrent&xt=urn:btih:0204d780ebfab0d5d9d3476a038e812ad792deeb&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fstreaming-playlists%2Fhls%2F6050732a-8a7a-43d4-a6cd-809525a1d206%2F6050732a-8a7a-43d4-a6cd-809525a1d206-1080-fragmented.mp4","height":1080},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/6050732a-8a7a-43d4-a6cd-809525a1d206-480-fragmented.mp4","height":480,"size":249562889,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309945","height":480,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-480-hls.torrent","height":480},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480-hls.torrent&xt=urn:btih:5d14f38ded29de629668fe1cfc61a75f4cce2628&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fstreaming-playlists%2Fhls%2F6050732a-8a7a-43d4-a6cd-809525a1d206%2F6050732a-8a7a-43d4-a6cd-809525a1d206-480-fragmented.mp4","height":480},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/6050732a-8a7a-43d4-a6cd-809525a1d206-360-fragmented.mp4","height":360,"size":170836415,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309946","height":360,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-360-hls.torrent","height":360},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360-hls.torrent&xt=urn:btih:30125488789080ad405ebcee6c214945f31b8f30&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fstreaming-playlists%2Fhls%2F6050732a-8a7a-43d4-a6cd-809525a1d206%2F6050732a-8a7a-43d4-a6cd-809525a1d206-360-fragmented.mp4","height":360},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/6050732a-8a7a-43d4-a6cd-809525a1d206-720-fragmented.mp4","height":720,"size":496533741,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309947","height":720,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-720-hls.torrent","height":720},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720-hls.torrent&xt=urn:btih:8ed1e8bccde709901c26e315fc8f53bfd26d1ba6&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fstreaming-playlists%2Fhls%2F6050732a-8a7a-43d4-a6cd-809525a1d206%2F6050732a-8a7a-43d4-a6cd-809525a1d206-720-fragmented.mp4","height":720},{"type":"Link","mediaType":"video/mp4","href":"https://framatube.org/static/streaming-playlists/hls/6050732a-8a7a-43d4-a6cd-809525a1d206/6050732a-8a7a-43d4-a6cd-809525a1d206-240-fragmented.mp4","height":240,"size":112529249,"fps":25},{"type":"Link","rel":["metadata","video/mp4"],"mediaType":"application/json","href":"https://framatube.org/api/v1/videos/6050732a-8a7a-43d4-a6cd-809525a1d206/metadata/1309948","height":240,"fps":25},{"type":"Link","mediaType":"application/x-bittorrent","href":"https://framatube.org/static/torrents/6050732a-8a7a-43d4-a6cd-809525a1d206-240-hls.torrent","height":240},{"type":"Link","mediaType":"application/x-bittorrent;x-scheme-handler/magnet","href":"magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240-hls.torrent&xt=urn:btih:8b452bf4e70b9078d4e74ca8b5523cc9dc70d10a&dn=D%C3%A9framasoftisons+Internet+%5BFramasoft%5D&tr=wss%3A%2F%2Fframatube.org%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fstreaming-playlists%2Fhls%2F6050732a-8a7a-43d4-a6cd-809525a1d206%2F6050732a-8a7a-43d4-a6cd-809525a1d206-240-fragmented.mp4","height":240}]}],"likes":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206/likes","dislikes":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206/dislikes","shares":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206/announces","comments":"https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206/comments","attributedTo":[{"type":"Person","id":"https://framatube.org/accounts/framasoft"},{"type":"Group","id":"https://framatube.org/video-channels/bf54d359-cfad-4935-9d45-9d6be93f63e8"}],"to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://framatube.org/accounts/framasoft/followers"],"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"RsaSignature2017":"https://w3id.org/security#RsaSignature2017"},{"pt":"https://joinpeertube.org/ns#","sc":"http://schema.org#","Hashtag":"as:Hashtag","uuid":"sc:identifier","category":"sc:category","licence":"sc:license","subtitleLanguage":"sc:subtitleLanguage","sensitive":"as:sensitive","language":"sc:inLanguage","Infohash":"pt:Infohash","Playlist":"pt:Playlist","PlaylistElement":"pt:PlaylistElement","originallyPublishedAt":"sc:datePublished","views":{"@type":"sc:Number","@id":"pt:views"},"state":{"@type":"sc:Number","@id":"pt:state"},"size":{"@type":"sc:Number","@id":"pt:size"},"fps":{"@type":"sc:Number","@id":"pt:fps"},"startTimestamp":{"@type":"sc:Number","@id":"pt:startTimestamp"},"stopTimestamp":{"@type":"sc:Number","@id":"pt:stopTimestamp"},"position":{"@type":"sc:Number","@id":"pt:position"},"commentsEnabled":{"@type":"sc:Boolean","@id":"pt:commentsEnabled"},"downloadEnabled":{"@type":"sc:Boolean","@id":"pt:downloadEnabled"},"waitTranscoding":{"@type":"sc:Boolean","@id":"pt:waitTranscoding"},"support":{"@type":"sc:Text","@id":"pt:support"},"likes":{"@id":"as:likes","@type":"@id"},"dislikes":{"@id":"as:dislikes","@type":"@id"},"playlists":{"@id":"pt:playlists","@type":"@id"},"shares":{"@id":"as:shares","@type":"@id"},"comments":{"@id":"as:comments","@type":"@id"}}]}
\ No newline at end of file
diff --git a/test/fixtures/tesla_mock/frontend.zip b/test/fixtures/tesla_mock/frontend.zip
new file mode 100644
index 000000000..114d576a3
Binary files /dev/null and b/test/fixtures/tesla_mock/frontend.zip differ
diff --git a/test/fixtures/tesla_mock/frontend_dist.zip b/test/fixtures/tesla_mock/frontend_dist.zip
new file mode 100644
index 000000000..20d7952a4
Binary files /dev/null and b/test/fixtures/tesla_mock/frontend_dist.zip differ
diff --git a/test/fixtures/tesla_mock/funkwhale_create_audio.json b/test/fixtures/tesla_mock/funkwhale_create_audio.json
new file mode 100644
index 000000000..fe6059cbf
--- /dev/null
+++ b/test/fixtures/tesla_mock/funkwhale_create_audio.json
@@ -0,0 +1,58 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ "https://funkwhale.audio/ns",
+ {
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "Hashtag": "as:Hashtag"
+ }
+ ],
+ "type": "Create",
+ "id": "https://channels.tests.funkwhale.audio/federation/music/uploads/42342395-0208-4fee-a38d-259a6dae0871/activity",
+ "actor": "https://channels.tests.funkwhale.audio/federation/actors/compositions",
+ "object": {
+ "id": "https://channels.tests.funkwhale.audio/federation/music/uploads/42342395-0208-4fee-a38d-259a6dae0871",
+ "type": "Audio",
+ "name": "Compositions - Test Audio for Pleroma",
+ "attributedTo": "https://channels.tests.funkwhale.audio/federation/actors/compositions",
+ "published": "2020-03-11T10:01:52.714918+00:00",
+ "to": "https://www.w3.org/ns/activitystreams#Public",
+ "url": [
+ {
+ "type": "Link",
+ "mimeType": "audio/ogg",
+ "href": "https://channels.tests.funkwhale.audio/api/v1/listen/3901e5d8-0445-49d5-9711-e096cf32e515/?upload=42342395-0208-4fee-a38d-259a6dae0871&download=false"
+ },
+ {
+ "type": "Link",
+ "mimeType": "text/html",
+ "href": "https://channels.tests.funkwhale.audio/library/tracks/74"
+ }
+ ],
+ "content": "
This is a test Audio for Pleroma.
",
+ "mediaType": "text/html",
+ "tag": [
+ {
+ "type": "Hashtag",
+ "name": "#funkwhale"
+ },
+ {
+ "type": "Hashtag",
+ "name": "#test"
+ },
+ {
+ "type": "Hashtag",
+ "name": "#tests"
+ }
+ ],
+ "summary": "#funkwhale #test #tests",
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers"
+ }
+ ]
+ }
+}
diff --git a/test/fixtures/tesla_mock/http__gs.example.org_index.php_api_statuses_user_timeline_1.atom.xml b/test/fixtures/tesla_mock/http__gs.example.org_index.php_api_statuses_user_timeline_1.atom.xml
deleted file mode 100644
index 490467708..000000000
--- a/test/fixtures/tesla_mock/http__gs.example.org_index.php_api_statuses_user_timeline_1.atom.xml
+++ /dev/null
@@ -1,460 +0,0 @@
-
-
- GNU social
- http://gs.example.org/index.php/api/statuses/user_timeline/1.atom
- lambda timeline
- Updates from lambda on gs.example.org!
- http://gs.example.org/theme/neo-gnu/default-avatar-profile.png
- 2017-05-05T12:09:57+00:00
-
- http://activitystrea.ms/schema/1.0/person
- http://gs.example.org:4040/index.php/user/1
- lambda
-
-
-
-
- lambda
- lambda
-
-
-
-
-
-
-
-
-
-
-
-
- tag:gs.example.org,2017-05-04:noticeId=84:objectType=note
- lambda repeated a notice by lambda2
- RT @<a href="http://gs.example.org/index.php/user/7" class="h-card mention">lambda2</a> Hello!
-
- http://activitystrea.ms/schema/1.0/share
- 2017-05-04T16:38:50+00:00
- 2017-05-04T16:38:50+00:00
-
- http://activitystrea.ms/schema/1.0/activity
- tag:gs.example.org,2017-05-01:noticeId=67:objectType=note
-
- Hello!
-
- http://activitystrea.ms/schema/1.0/post
- 2017-05-01T08:41:04+00:00
- 2017-05-01T08:41:04+00:00
-
- http://activitystrea.ms/schema/1.0/person
- http://gs.example.org/index.php/user/7
- lambda2
-
-
-
-
-
- lambda2
- lambda2
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-05-01:noticeId=67:objectType=note
- New note by lambda2
- Hello!
-
-
-
-
- tag:gs.example.org,2017-05-01:objectType=thread:nonce=cffa792cb95fe417
-
-
-
-
-
-
- tag:gs.example.org,2017-05-01:objectType=thread:nonce=cffa792cb95fe417
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-30:noticeId=63:objectType=note
- New note by lambda
- what now?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-30T10:09:57+00:00
- 2017-04-30T10:09:57+00:00
-
-
-
- tag:gs.example.org,2017-04-30:objectType=thread:nonce=1bbb60991ae9874b
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-30:noticeId=61:objectType=note
- New note by lambda
- @<a href="http://pleroma.example.org:4000/users/lain5" class="h-card mention">lain5</a> Hello!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-30T10:07:26+00:00
- 2017-04-30T10:07:26+00:00
-
- tag:gs.example.org,2017-04-30:objectType=thread:nonce=1bbb60991ae9874b
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-29:noticeId=59:objectType=note
- New note by lambda
- ey
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T17:04:59+00:00
- 2017-04-29T17:04:59+00:00
-
- tag:gs.example.org,2017-04-29:objectType=thread:nonce=4cc42c2c61a0f4bd
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-29:noticeId=58:objectType=note
- New note by lambda
- Another one.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T17:02:47+00:00
- 2017-04-29T17:02:47+00:00
-
- tag:gs.example.org,2017-04-29:objectType=thread:nonce=53e9b8f1d6d38d13
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-29:noticeId=57:objectType=note
- New note by lambda
- Let's see if this comes over.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T17:01:39+00:00
- 2017-04-29T17:01:39+00:00
-
- tag:gs.example.org,2017-04-29:objectType=thread:nonce=238a7bd3ffc7c9cc
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org,2017-04-29:noticeId=56:objectType=note
- New note by lambda
- @<a href="http://pleroma.example.org:4000/users/lain5" class="h-card mention">lain5</a> Hey!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-29T16:38:13+00:00
- 2017-04-29T16:38:13+00:00
-
- tag:gs.example.org,2017-04-29:objectType=thread:nonce=2629d3a398171b0f
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=55:objectType=note
- New note by lambda
- hey.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:16:13+00:00
- 2017-04-25T18:16:13+00:00
-
-
-
- http://pleroma.example.org:4000/contexts/8f6f45d4-8e4d-4e1a-a2de-09f27367d2d0
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=53:objectType=note
- New note by lambda
- and this?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:14:34+00:00
- 2017-04-25T18:14:34+00:00
-
-
-
- http://pleroma.example.org:4000/contexts/24779b0e-91ad-487e-81bd-6cf5bb437b09
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=52:objectType=note
- New note by lambda
- yeah it does :)
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:13:31+00:00
- 2017-04-25T18:13:31+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=e0dc24b1a93ab6b3
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=50:objectType=note
- New note by lambda
- @<a href="http://pleroma.example.org:4000/users/lain5" class="h-card mention">lain5</a> Let's try with one that originates here!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:10:28+00:00
- 2017-04-25T18:10:28+00:00
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=e0dc24b1a93ab6b3
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=48:objectType=note
- New note by lambda
- works?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:08:44+00:00
- 2017-04-25T18:08:44+00:00
-
-
-
- http://pleroma.example.org:4000/contexts/24779b0e-91ad-487e-81bd-6cf5bb437b09
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=46:objectType=note
- New note by lambda
- Let's send you an answer.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:05:31+00:00
- 2017-04-25T18:05:31+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=73c7bcf6658f7ce3
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=44:objectType=note
- New note by lambda
- Hey.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T18:01:09+00:00
- 2017-04-25T18:01:09+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=6e7c8fc2823380b4
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=43:objectType=note
- New note by lambda
- What's coming to you?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T17:58:41+00:00
- 2017-04-25T17:58:41+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=6e7c8fc2823380b4
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=42:objectType=note
- New note by lambda
- Now this is podracing.
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T17:57:40+00:00
- 2017-04-25T17:57:40+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=6e7c8fc2823380b4
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=39:objectType=note
- New note by lambda
- Sure looks like it!
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T17:48:27+00:00
- 2017-04-25T17:48:27+00:00
-
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=4c6114a75bb4cea5
-
-
-
-
-
-
-
- tag:gs.example.org:4040,2017-04-25:subscription:1:person:6:2017-04-25T17:47:47+00:00
- lambda (lambda)'s status on Tuesday, 25-Apr-2017 17:47:47 UTC
- <a href="http://gs.example.org:4040/index.php/lambda">lambda</a> started following <a href="http://pleroma.example.org:4000/users/lain5">l</a>.
-
- http://activitystrea.ms/schema/1.0/follow
- 2017-04-25T17:47:47+00:00
- 2017-04-25T17:47:47+00:00
-
- http://activitystrea.ms/schema/1.0/person
- http://pleroma.example.org:4000/users/lain5
- l
- lambadalambda
-
-
-
-
-
- lain5
- l
- lambadalambda
-
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=119acad17515314c
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=36:objectType=note
- New note by lambda
- @<a href="http://pleroma.example.org:4000/users/lain5" class="h-card mention">lain5</a> Hey, how are you?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T17:46:22+00:00
- 2017-04-25T17:46:22+00:00
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=9c5ec19a18191372
-
-
-
-
-
-
-
- http://activitystrea.ms/schema/1.0/note
- tag:gs.example.org:4040,2017-04-25:noticeId=35:objectType=note
- New note by lambda
- @lain5@pleroma.example.org does this not work?
-
-
- http://activitystrea.ms/schema/1.0/post
- 2017-04-25T17:42:31+00:00
- 2017-04-25T17:42:31+00:00
-
- tag:gs.example.org:4040,2017-04-25:objectType=thread:nonce=fc841d7f52caa363
-
-
-
-
-
-
diff --git a/test/fixtures/tesla_mock/https___framatube.org_accounts_framasoft.json b/test/fixtures/tesla_mock/https___framatube.org_accounts_framasoft.json
new file mode 100644
index 000000000..1c3f779b3
--- /dev/null
+++ b/test/fixtures/tesla_mock/https___framatube.org_accounts_framasoft.json
@@ -0,0 +1 @@
+{"type":"Person","id":"https://framatube.org/accounts/framasoft","following":"https://framatube.org/accounts/framasoft/following","followers":"https://framatube.org/accounts/framasoft/followers","playlists":"https://framatube.org/accounts/framasoft/playlists","inbox":"https://framatube.org/accounts/framasoft/inbox","outbox":"https://framatube.org/accounts/framasoft/outbox","preferredUsername":"framasoft","url":"https://framatube.org/accounts/framasoft","name":"Framasoft","endpoints":{"sharedInbox":"https://framatube.org/inbox"},"publicKey":{"id":"https://framatube.org/accounts/framasoft#main-key","owner":"https://framatube.org/accounts/framasoft","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuRh3frgIg866D0y0FThp\nSUkJImMcHGkUvpYQYv2iUgarZZtEbwT8PfQf0bJazy+cP8KqQmMDf5PBhT7dfdny\nf/GKGMw9Olc+QISeKDj3sqZ3Csrm4KV4avMGCfth6eSU7LozojeSGCXdUFz/8UgE\nfhV4mJjEX/FbwRYoKlagv5rY9mkX5XomzZU+z9j6ZVXyofwOwJvmI1hq0SYDv2bc\neB/RgIh/H0nyMtF8o+0CT42FNEET9j9m1BKOBtPzwZHmitKRkEmui5cK256s1laB\nT61KHpcD9gQKkQ+I3sFEzCBUJYfVo6fUe+GehBZuAfq4qDhd15SfE4K9veDscDFI\nTwIDAQAB\n-----END PUBLIC KEY-----"},"icon":{"type":"Image","mediaType":"image/png","url":"https://framatube.org/lazy-static/avatars/f73876f5-1d45-4f8a-942a-d3d5d5ac5dc1.png"},"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"RsaSignature2017":"https://w3id.org/security#RsaSignature2017","pt":"https://joinpeertube.org/ns#","sc":"http://schema.org#","Hashtag":"as:Hashtag","uuid":"sc:identifier","category":"sc:category","licence":"sc:license","subtitleLanguage":"sc:subtitleLanguage","sensitive":"as:sensitive","language":"sc:inLanguage","expires":"sc:expires","CacheFile":"pt:CacheFile","Infohash":"pt:Infohash","originallyPublishedAt":"sc:datePublished","views":{"@type":"sc:Number","@id":"pt:views"},"state":{"@type":"sc:Number","@id":"pt:state"},"size":{"@type":"sc:Number","@id":"pt:size"},"fps":{"@type":"sc:Number","@id":"pt:fps"},"startTimestamp":{"@type":"sc:Number","@id":"pt:startTimestamp"},"stopTimestamp":{"@type":"sc:Number","@id":"pt:stopTimestamp"},"position":{"@type":"sc:Number","@id":"pt:position"},"commentsEnabled":{"@type":"sc:Boolean","@id":"pt:commentsEnabled"},"downloadEnabled":{"@type":"sc:Boolean","@id":"pt:downloadEnabled"},"waitTranscoding":{"@type":"sc:Boolean","@id":"pt:waitTranscoding"},"support":{"@type":"sc:Text","@id":"pt:support"}},{"likes":{"@id":"as:likes","@type":"@id"},"dislikes":{"@id":"as:dislikes","@type":"@id"},"playlists":{"@id":"pt:playlists","@type":"@id"},"shares":{"@id":"as:shares","@type":"@id"},"comments":{"@id":"as:comments","@type":"@id"}}],"summary":null}
\ No newline at end of file
diff --git a/test/fixtures/tesla_mock/https___mamot.fr_users_Skruyb.atom b/test/fixtures/tesla_mock/https___mamot.fr_users_Skruyb.atom
deleted file mode 100644
index b5f3d923b..000000000
--- a/test/fixtures/tesla_mock/https___mamot.fr_users_Skruyb.atom
+++ /dev/null
@@ -1,342 +0,0 @@
-
-
- https://mamot.fr/users/Skruyb.atom
- The 7th Son
- Fr and En.
-Posts will disappear on a regular basis.
- 2017-04-28T13:54:23Z
- https://mamot.fr/system/accounts/avatars/000/026/213/original/d95dbcfc76f77f4c.jpg?1493230984
-
- https://mamot.fr/users/Skruyb
- http://activitystrea.ms/schema/1.0/person
- https://mamot.fr/users/Skruyb
- Skruyb
- Skruyb@mamot.fr
- <p>Fr and En.<br />Posts will disappear on a regular basis.</p>
-
-
-
- Skruyb
- The 7th Son
- Fr and En.
-Posts will disappear on a regular basis.
- public
-
-
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1299665:objectType=Status
- 2017-05-10T20:06:59Z
- 2017-05-10T20:06:59Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pouets.ovh/@noName" class="u-url mention">@<span>noName</span></a></span></p><p>Pour comparer faut avoir tester... Ô wait!!! 😁</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1299185:objectType=Status
- 2017-05-10T19:52:14Z
- 2017-05-10T19:52:14Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://witches.town/@Dhveszak" class="u-url mention">@<span>Dhveszak</span></a></span></p><p>Toi!! Tu vises le ministère de la propagande avoue!!!!!!!</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1299019:objectType=Status
- 2017-05-10T19:47:19Z
- 2017-05-10T19:47:19Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Facebook s'attaque aux sites internet "trompeurs"</p><p><a href="http://u.afp.com/4W4z" rel="nofollow noopener" target="_blank"><span class="invisible">http://</span><span class="">u.afp.com/4W4z</span><span class="invisible"></span></a></p><p>J'attends de voir que Facebook s'attaque à lui même... rien qu'à lire leurs conditions générales d'utilisation, le respect de la vie privée...</p><p>Charité bien ordonnée... Parfois l'égoïsme aurait du bon.</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1298889:objectType=Status
- 2017-05-10T19:43:18Z
- 2017-05-10T19:43:18Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://octodon.social/@Balise" class="u-url mention">@<span>Balise</span></a></span></p><p>Fait comme moi, annonce que tu fais dans le flou artistique et que seuls des esprits éclairés pourront en percevoir la beauté et apprécier. Globalement après ça, tout le monde trouve les photos cool :-p</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1298728:objectType=Status
- 2017-05-10T19:38:39Z
- 2017-05-10T19:38:39Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@applecandy" class="u-url mention">@<span>applecandy</span></a></span></p><p>Lucky you!!!</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1298431:objectType=Status
- 2017-05-10T19:26:32Z
- 2017-05-10T19:26:32Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Est-ce que je suis le seul qui lorsqu'il commence à compter les arbres sur le bord de la route n'arrive pas à s'arrêter de compter?</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1298224:objectType=Status
- 2017-05-10T19:18:17Z
- 2017-05-10T19:18:17Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Ca y est j'ai une nouvelle passion. Mettre les bouchons qui trainent par terre dans le bons sens avec mon pied 🙌</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1297450:objectType=Status
- 2017-05-10T18:53:37Z
- 2017-05-10T18:53:37Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Ok. On est capable d'envoyer des mecs dans l'espace, avoir des voitures autonomes, des trucs intelligents de partout mais pas tous les bâtiments accessibles aux personnes à mobilité réduite, les émissions sur le services publics avec une personne faisant la traduction pour les sourds et malentendants de manière systématique...</p><p>J'ai du louper un truc dans l'ordre des priorités Oo</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1297292:objectType=Status
- 2017-05-10T18:48:17Z
- 2017-05-10T18:48:17Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>J'ai comme envie de faire un truc mais je ne sais pas quoi mais pourtant c'est comme si je ressentais l'idée dans ma tête mais c'est pas clair...</p><p>Fuck!!! J'vais aller draguer Josiane à la compta ça va me changer les idées!!!</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1296598:objectType=Status
- 2017-05-10T18:25:11Z
- 2017-05-10T18:25:11Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@Smeablog" class="u-url mention">@<span>Smeablog</span></a></span></p><p>Pas faux MDR!!!!</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1296571:objectType=Status
- 2017-05-10T18:24:13Z
- 2017-05-10T18:24:13Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@Smeablog" class="u-url mention">@<span>Smeablog</span></a></span></p><p>Ca ne change pas la finalité malheureusement, ça ne m'ouvre pas ce à quoi je veux accéder 😭</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1296475:objectType=Status
- 2017-05-10T18:20:50Z
- 2017-05-10T18:20:50Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Arrrgghhhhhhh!!!!</p><p>Quand t'es sur le point de cliquer sur un lien dans le fil public global et que BOOM ça se met à jour... J'ose même pas imaginer combien j'ai ouvert de pages web sans le vouloir!!!</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1296426:objectType=Status
- 2017-05-10T18:19:17Z
- 2017-05-10T18:19:17Z
- Skruyb shared a status by Isaluini@mastodon.social
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:mastodon.social,2017-05-10:objectId=5587049:objectType=Status
- 2017-05-10T18:18:59Z
- 2017-05-10T18:19:00Z
- New status by Isaluini@mastodon.social
-
- https://mastodon.social/users/Isaluini
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/Isaluini
- Isaluini
- Isaluini@mastodon.social
- <p>Adicciones: Escribir, diseñar, cine, café, humor negro, música y dibujar. | Jedi. Bueno, no. Algún día (?) | Gratitude.</p>
-
-
-
- Isaluini
- Isa
- Adicciones: Escribir, diseñar, cine, café, humor negro, música y dibujar. | Jedi. Bueno, no. Algún día (?) | Gratitude.
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>♫ <br><a href="https://www.youtube.com/watch?v=pT68FS3YbQ4"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=pT68FS3YbQ</span><span class="invisible">4</span></a></p>
-
- public
-
-
- <p>♫ <br><a href="https://www.youtube.com/watch?v=pT68FS3YbQ4"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=pT68FS3YbQ</span><span class="invisible">4</span></a></p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1295893:objectType=Status
- 2017-05-10T18:01:51Z
- 2017-05-10T18:01:51Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@Chat2Gouttieres" class="u-url mention">@<span>Chat2Gouttieres</span></a></span></p><p>Ah bah après faut savoir mettre à profit ce savoir ^^</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1295815:objectType=Status
- 2017-05-10T18:00:02Z
- 2017-05-10T18:00:02Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@Chat2Gouttieres" class="u-url mention">@<span>Chat2Gouttieres</span></a></span></p><p>Exactement. On a les jeux mais pas le pain encore.</p><p>Finalement on a rien inventé :-p</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1295778:objectType=Status
- 2017-05-10T17:58:52Z
- 2017-05-10T17:58:52Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@Chat2Gouttieres" class="u-url mention">@<span>Chat2Gouttieres</span></a></span></p><p>C'est ça visiblement dans notre société dite moderne... "Créer l'illusion que" Oo.</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1294943:objectType=Status
- 2017-05-10T17:31:44Z
- 2017-05-10T17:31:44Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- Hey.
- <p><span class="h-card"><a href="https://mastodon.social/@lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span></p><p>Hey!!!</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1294914:objectType=Status
- 2017-05-10T17:30:40Z
- 2017-05-10T17:30:40Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mamot.fr/@EloClemTiti" class="u-url mention">@<span>EloClemTiti</span></a></span></p><p>J'ai souvent cette impression en effet 😂</p>
-
-
- public
-
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1294148:objectType=Status
- 2017-05-10T17:02:01Z
- 2017-05-10T17:02:01Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Les gars, les boss veulent voir de l'avancement!! Une idée?</p><p>On fait comme d'habitude. On divise nos tâches en 25.000 tâches unitaires, on fout du vert au maximum et on crée l'illusion que ça a bien avancé!</p><p>Deal!!</p><p>Bob, tu choisis quel vert on utilise<br />Alice, t'es en charge de la typo<br />Moi, je m'occupe qu'on prend bien le dernier template ppt fournit par la comm interne.</p><p>Des winners qu'on est!!!! Des WI-NNERS!!!</p>
-
- public
-
-
-
-
- tag:mamot.fr,2017-05-10:objectId=1293995:objectType=Status
- 2017-05-10T16:57:53Z
- 2017-05-10T16:57:53Z
- New status by Skruyb
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://mastodon.social/@SauceHair" class="u-url mention">@<span>SauceHair</span></a></span></p><p>Cool!!</p><p>Bon courage.</p>
-
-
- public
-
-
-
-
-
diff --git a/test/fixtures/tesla_mock/https___mastodon.social_users_lambadalambda.atom b/test/fixtures/tesla_mock/https___mastodon.social_users_lambadalambda.atom
deleted file mode 100644
index 4d732b109..000000000
--- a/test/fixtures/tesla_mock/https___mastodon.social_users_lambadalambda.atom
+++ /dev/null
@@ -1,464 +0,0 @@
-
-
- https://mastodon.social/users/lambadalambda.atom
- Critical Value
-
- 2017-04-16T21:47:25Z
- https://files.mastodon.social/accounts/avatars/000/000/264/original/1429214160519.gif
-
- https://mastodon.social/users/lambadalambda
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.social/users/lambadalambda
- lambadalambda
- lambadalambda@mastodon.social
-
-
-
- lambadalambda
- Critical Value
- public
-
-
-
-
-
-
-
- tag:mastodon.social,2017-05-04:objectId=4991300:objectType=Status
- 2017-05-04T14:10:30Z
- 2017-05-04T14:10:30Z
- Delete
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/delete
-
-
-
-
- tag:mastodon.social,2017-05-04:objectId=4980289:objectType=Status
- 2017-05-04T07:43:23Z
- 2017-05-04T07:43:23Z
- Delete
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/delete
-
-
-
-
- tag:mastodon.social,2017-05-03:objectId=4952899:objectType=Status
- 2017-05-03T17:26:43Z
- 2017-05-03T17:26:43Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> OK!!</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-03:objectId=4952810:objectType=Status
- 2017-05-03T17:24:34Z
- 2017-05-03T17:24:34Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> yeah :)</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-03:objectId=4950388:objectType=Status
- 2017-05-03T16:22:00Z
- 2017-05-03T16:22:00Z
- lambadalambda shared a status by lambadalambda@social.heldscal.la
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.heldscal.la,2017-05-03:noticeId=2030733:objectType=note
- 2017-05-03T12:29:20Z
- 2017-05-03T12:29:31Z
- New status by lambadalambda@social.heldscal.la
-
- https://social.heldscal.la/user/23211
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- lambadalambda@social.heldscal.la
- Call me Deacon Blues.
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Time for work. <a href="https://social.heldscal.la/file/953c117a1e7e4c763755d2ac29cf1aae08e025599f4a4cc11ddff4082c07f969.jpg">https://social.heldscal.la/attachment/120552</a>
-
-
- public
-
-
- Time for work. <a href="https://social.heldscal.la/file/953c117a1e7e4c763755d2ac29cf1aae08e025599f4a4cc11ddff4082c07f969.jpg">https://social.heldscal.la/attachment/120552</a>
-
- public
-
-
-
-
- tag:mastodon.social,2017-05-03:objectId=4934452:objectType=Status
- 2017-05-03T08:21:09Z
- 2017-05-03T08:21:09Z
- lambadalambda shared a status by lain@pleroma.soykaf.com
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- https://pleroma.soykaf.com/objects/4c1bda26-902e-4525-9fcd-b9fd44925193
- 2017-05-03T08:04:44Z
- 2017-05-03T08:05:52Z
- New status by lain@pleroma.soykaf.com
-
- https://pleroma.soykaf.com/users/lain
- http://activitystrea.ms/schema/1.0/person
- https://pleroma.soykaf.com/users/lain
- lain
- lain@pleroma.soykaf.com
- Test account
-
-
-
- lain
- Lain Iwakura
- Test account
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- public
-
-
- Added returning the entries as xml... let's see if the mastodon hammering stops now.
-
- public
-
-
-
-
- tag:mastodon.social,2017-05-02:objectId=4905499:objectType=Status
- 2017-05-02T19:34:21Z
- 2017-05-02T19:34:21Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> yay!</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-02:objectId=4905442:objectType=Status
- 2017-05-02T19:33:33Z
- 2017-05-02T19:33:33Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> so?</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-02:objectId=4901603:objectType=Status
- 2017-05-02T18:33:06Z
- 2017-05-02T18:33:06Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> hey</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-01:objectId=4836720:objectType=Status
- 2017-05-01T18:52:16Z
- 2017-05-01T18:52:16Z
- lambadalambda shared a status by lain@pleroma.soykaf.com
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- https://pleroma.soykaf.com/objects/7b41bb51-9aba-436a-82d9-dd3f5aca98c9
- 2017-05-01T18:50:54Z
- 2017-05-01T18:50:57Z
- New status by lain@pleroma.soykaf.com
-
- https://pleroma.soykaf.com/users/lain
- http://activitystrea.ms/schema/1.0/person
- https://pleroma.soykaf.com/users/lain
- lain
- lain@pleroma.soykaf.com
- Test account
-
-
-
- lain
- Lain Iwakura
- Test account
- public
-
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <a href="https://mastodon.social/users/lambadalambda">@lambadalambda@mastodon.social</a> you're an all-star.
-
-
- public
-
-
-
- <a href="https://mastodon.social/users/lambadalambda">@lambadalambda@mastodon.social</a> you're an all-star.
-
- public
-
-
-
-
- tag:mastodon.social,2017-05-01:objectId=4836142:objectType=Status
- 2017-05-01T18:38:47Z
- 2017-05-01T18:38:47Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> Hey now!</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-01:objectId=4836055:objectType=Status
- 2017-05-01T18:37:04Z
- 2017-05-01T18:37:04Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/comment
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> hello</p>
-
-
- public
-
-
-
-
-
- tag:mastodon.social,2017-05-01:objectId=4834850:objectType=Status
- 2017-05-01T18:10:43Z
- 2017-05-01T18:10:43Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://pleroma.soykaf.com/users/lain" class="u-url mention">@<span>lain</span></a></span> Hey!</p>
-
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-29:objectId=4694455:objectType=Status
- 2017-04-29T18:39:12Z
- 2017-04-29T18:39:12Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>@lain@pleroma.soykaf.com What's up?</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-29:objectId=4694384:objectType=Status
- 2017-04-29T18:37:32Z
- 2017-04-29T18:37:32Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://social.heldscal.la/lain" class="u-url mention">@<span>lain</span></a></span> Hey.</p>
-
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-07:objectId=1874242:objectType=Status
- 2017-04-07T11:02:56Z
- 2017-04-07T11:02:56Z
- lambadalambda shared a status by 0xroy@social.wxcafe.net
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.wxcafe.net,2017-04-07:objectId=72554:objectType=Status
- 2017-04-07T11:01:59Z
- 2017-04-07T11:02:00Z
- New status by 0xroy@social.wxcafe.net
-
- https://social.wxcafe.net/users/0xroy
- http://activitystrea.ms/schema/1.0/person
- https://social.wxcafe.net/users/0xroy
- 0xroy
- 0xroy@social.wxcafe.net
- ta caution weeb | discussions privées : <a href="https://%F0%9F%92%8C.0xroy.me"><span class="invisible">https://</span><span class="">💌.0xroy.me</span><span class="invisible"></span></a>
-
-
-
- 0xroy
- 「R O Y 🍵 B O S」
- ta caution weeb | discussions privées : https://💌.0xroy.me
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>someone pls eli5 matrix (protocol) and riot</p>
-
- public
-
-
- <p>someone pls eli5 matrix (protocol) and riot</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-06:objectId=1768247:objectType=Status
- 2017-04-06T11:10:19Z
- 2017-04-06T11:10:19Z
- lambadalambda shared a status by areyoutoo@mastodon.xyz
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:mastodon.xyz,2017-04-05:objectId=133327:objectType=Status
- 2017-04-05T17:36:41Z
- 2017-04-05T18:12:14Z
- New status by areyoutoo@mastodon.xyz
-
- https://mastodon.xyz/users/areyoutoo
- http://activitystrea.ms/schema/1.0/person
- https://mastodon.xyz/users/areyoutoo
- areyoutoo
- areyoutoo@mastodon.xyz
- devops | retired gamedev | always boost puppy pics
-
-
-
- areyoutoo
- Raw Butter
- devops | retired gamedev | always boost puppy pics
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p>Some UX thoughts for <a href="https://mastodon.xyz/tags/mastodev">#<span>mastodev</span></a>:</p><p>- Would be nice if I could work on multiple draft toots? Clicking to reply to someone seems to erase any draft I had been working on.</p><p>- Kinda risky to click on the Federated Timeline if it loads new toots and scrolls 10ms before I click on something.</p><p>I probably don't know enough web frontend to help, but it might be fun to try.</p>
-
-
- public
-
-
- <p>Some UX thoughts for <a href="https://mastodon.xyz/tags/mastodev">#<span>mastodev</span></a>:</p><p>- Would be nice if I could work on multiple draft toots? Clicking to reply to someone seems to erase any draft I had been working on.</p><p>- Kinda risky to click on the Federated Timeline if it loads new toots and scrolls 10ms before I click on something.</p><p>I probably don't know enough web frontend to help, but it might be fun to try.</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-06:objectId=1764509:objectType=Status
- 2017-04-06T10:15:38Z
- 2017-04-06T10:15:38Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- This is a test for cw federation
- <p>This is a test for cw federation body text.</p>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-05:objectId=1645208:objectType=Status
- 2017-04-05T07:14:53Z
- 2017-04-05T07:14:53Z
- lambadalambda shared a status by lambadalambda@social.heldscal.la
- http://activitystrea.ms/schema/1.0/activity
- http://activitystrea.ms/schema/1.0/share
-
- tag:social.heldscal.la,2017-04-05:noticeId=1502088:objectType=note
- 2017-04-05T06:12:09Z
- 2017-04-05T07:12:47Z
- New status by lambadalambda@social.heldscal.la
-
- https://social.heldscal.la/user/23211
- http://activitystrea.ms/schema/1.0/person
- https://social.heldscal.la/user/23211
- lambadalambda
- lambadalambda@social.heldscal.la
- Call me Deacon Blues.
-
-
-
- lambadalambda
- Constance Variable
- Call me Deacon Blues.
- public
-
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- Federation 101: <a href="https://www.youtube.com/watch?v=t1lYU5CA40o">https://www.youtube.com/watch?v=t1lYU5CA40o</a>
-
- public
-
-
- Federation 101: <a href="https://www.youtube.com/watch?v=t1lYU5CA40o">https://www.youtube.com/watch?v=t1lYU5CA40o</a>
-
- public
-
-
-
-
- tag:mastodon.social,2017-04-05:objectId=1641750:objectType=Status
- 2017-04-05T05:44:48Z
- 2017-04-05T05:44:48Z
- New status by lambadalambda
- http://activitystrea.ms/schema/1.0/note
- http://activitystrea.ms/schema/1.0/post
- <p><span class="h-card"><a href="https://social.heldscal.la/lambadalambda" class="u-url mention">@<span>lambadalambda</span></a></span> just a test.</p>
-
-
- public
-
-
-
-
diff --git a/test/fixtures/tesla_mock/https___osada.macgirvin.com.html b/test/fixtures/tesla_mock/https___osada.macgirvin.com.html
new file mode 100644
index 000000000..880273d74
--- /dev/null
+++ b/test/fixtures/tesla_mock/https___osada.macgirvin.com.html
@@ -0,0 +1,301 @@
+
+
+
+ Osada
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
alert('xss')"
+ assert object.data["source"] == post
end
test "it filters out obviously bad tags when accepting a post as Markdown" do
@@ -461,6 +517,7 @@ test "it filters out obviously bad tags when accepting a post as Markdown" do
object = Object.normalize(activity)
assert object.data["content"] == "
2hu
alert('xss')"
+ assert object.data["source"] == post
end
test "it does not allow replies to direct messages that are not direct messages themselves" do
@@ -543,15 +600,15 @@ test "it validates character limits are correctly enforced" do
test "it can handle activities that expire" do
user = insert(:user)
- expires_at =
- NaiveDateTime.utc_now()
- |> NaiveDateTime.truncate(:second)
- |> NaiveDateTime.add(1_000_000, :second)
+ expires_at = DateTime.add(DateTime.utc_now(), 1_000_000)
assert {:ok, activity} = CommonAPI.post(user, %{status: "chai", expires_in: 1_000_000})
- assert expiration = Pleroma.ActivityExpiration.get_by_activity_id(activity.id)
- assert expiration.scheduled_at == expires_at
+ assert_enqueued(
+ worker: Pleroma.Workers.PurgeExpiredActivity,
+ args: %{activity_id: activity.id},
+ scheduled_at: expires_at
+ )
end
end
@@ -576,14 +633,27 @@ test "unreacting to a status with an emoji" do
user = insert(:user)
other_user = insert(:user)
- {:ok, activity} = CommonAPI.post(other_user, %{status: "cofe"})
- {:ok, reaction} = CommonAPI.react_with_emoji(activity.id, user, "👍")
+ clear_config([:instance, :federating], true)
- {:ok, unreaction} = CommonAPI.unreact_with_emoji(activity.id, user, "👍")
+ with_mock Pleroma.Web.Federator,
+ publish: fn _ -> nil end do
+ {:ok, activity} = CommonAPI.post(other_user, %{status: "cofe"})
+ {:ok, reaction} = CommonAPI.react_with_emoji(activity.id, user, "👍")
- assert unreaction.data["type"] == "Undo"
- assert unreaction.data["object"] == reaction.data["id"]
- assert unreaction.local
+ {:ok, unreaction} = CommonAPI.unreact_with_emoji(activity.id, user, "👍")
+
+ assert unreaction.data["type"] == "Undo"
+ assert unreaction.data["object"] == reaction.data["id"]
+ assert unreaction.local
+
+ # On federation, it contains the undone (and deleted) object
+ unreaction_with_object = %{
+ unreaction
+ | data: Map.put(unreaction.data, "object", reaction.data)
+ }
+
+ assert called(Pleroma.Web.Federator.publish(unreaction_with_object))
+ end
end
test "repeating a status" do
@@ -742,6 +812,69 @@ test "should unpin when deleting a status", %{user: user, activity: activity} do
[user: user, activity: activity]
end
+ test "marks notifications as read after mute" do
+ author = insert(:user)
+ activity = insert(:note_activity, user: author)
+
+ friend1 = insert(:user)
+ friend2 = insert(:user)
+
+ {:ok, reply_activity} =
+ CommonAPI.post(
+ friend2,
+ %{
+ status: "@#{author.nickname} @#{friend1.nickname} test reply",
+ in_reply_to_status_id: activity.id
+ }
+ )
+
+ {:ok, favorite_activity} = CommonAPI.favorite(friend2, activity.id)
+ {:ok, repeat_activity} = CommonAPI.repeat(activity.id, friend1)
+
+ assert Repo.aggregate(
+ from(n in Notification, where: n.seen == false and n.user_id == ^friend1.id),
+ :count
+ ) == 1
+
+ unread_notifications =
+ Repo.all(from(n in Notification, where: n.seen == false, where: n.user_id == ^author.id))
+
+ assert Enum.any?(unread_notifications, fn n ->
+ n.type == "favourite" && n.activity_id == favorite_activity.id
+ end)
+
+ assert Enum.any?(unread_notifications, fn n ->
+ n.type == "reblog" && n.activity_id == repeat_activity.id
+ end)
+
+ assert Enum.any?(unread_notifications, fn n ->
+ n.type == "mention" && n.activity_id == reply_activity.id
+ end)
+
+ {:ok, _} = CommonAPI.add_mute(author, activity)
+ assert CommonAPI.thread_muted?(author, activity)
+
+ assert Repo.aggregate(
+ from(n in Notification, where: n.seen == false and n.user_id == ^friend1.id),
+ :count
+ ) == 1
+
+ read_notifications =
+ Repo.all(from(n in Notification, where: n.seen == true, where: n.user_id == ^author.id))
+
+ assert Enum.any?(read_notifications, fn n ->
+ n.type == "favourite" && n.activity_id == favorite_activity.id
+ end)
+
+ assert Enum.any?(read_notifications, fn n ->
+ n.type == "reblog" && n.activity_id == repeat_activity.id
+ end)
+
+ assert Enum.any?(read_notifications, fn n ->
+ n.type == "mention" && n.activity_id == reply_activity.id
+ end)
+ end
+
test "add mute", %{user: user, activity: activity} do
{:ok, _} = CommonAPI.add_mute(user, activity)
assert CommonAPI.thread_muted?(user, activity)
@@ -886,6 +1019,15 @@ test "remove a reblog mute", %{muter: muter, muted: muted} do
end
end
+ describe "follow/2" do
+ test "directly follows a non-locked local user" do
+ [follower, followed] = insert_pair(:user)
+ {:ok, follower, followed, _} = CommonAPI.follow(follower, followed)
+
+ assert User.following?(follower, followed)
+ end
+ end
+
describe "unfollow/2" do
test "also unsubscribes a user" do
[follower, followed] = insert_pair(:user)
@@ -950,9 +1092,9 @@ test "after acceptance, it sets all existing pending follow request states to 'a
follower = insert(:user)
follower_two = insert(:user)
- {:ok, follow_activity} = ActivityPub.follow(follower, user)
- {:ok, follow_activity_two} = ActivityPub.follow(follower, user)
- {:ok, follow_activity_three} = ActivityPub.follow(follower_two, user)
+ {:ok, _, _, follow_activity} = CommonAPI.follow(follower, user)
+ {:ok, _, _, follow_activity_two} = CommonAPI.follow(follower, user)
+ {:ok, _, _, follow_activity_three} = CommonAPI.follow(follower_two, user)
assert follow_activity.data["state"] == "pending"
assert follow_activity_two.data["state"] == "pending"
@@ -970,9 +1112,9 @@ test "after rejection, it sets all existing pending follow request states to 're
follower = insert(:user)
follower_two = insert(:user)
- {:ok, follow_activity} = ActivityPub.follow(follower, user)
- {:ok, follow_activity_two} = ActivityPub.follow(follower, user)
- {:ok, follow_activity_three} = ActivityPub.follow(follower_two, user)
+ {:ok, _, _, follow_activity} = CommonAPI.follow(follower, user)
+ {:ok, _, _, follow_activity_two} = CommonAPI.follow(follower, user)
+ {:ok, _, _, follow_activity_three} = CommonAPI.follow(follower_two, user)
assert follow_activity.data["state"] == "pending"
assert follow_activity_two.data["state"] == "pending"
diff --git a/test/web/fallback_test.exs b/test/web/fallback_test.exs
index 3919ef93a..a65865860 100644
--- a/test/web/fallback_test.exs
+++ b/test/web/fallback_test.exs
@@ -6,22 +6,56 @@ defmodule Pleroma.Web.FallbackTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- test "GET /registration/:token", %{conn: conn} do
- assert conn
- |> get("/registration/foo")
- |> html_response(200) =~ ""
+ describe "neither preloaded data nor metadata attached to" do
+ test "GET /registration/:token", %{conn: conn} do
+ response = get(conn, "/registration/foo")
+
+ assert html_response(response, 200) =~ ""
+ end
+
+ test "GET /*path", %{conn: conn} do
+ assert conn
+ |> get("/foo")
+ |> html_response(200) =~ ""
+ end
end
- test "GET /:maybe_nickname_or_id", %{conn: conn} do
- user = insert(:user)
+ describe "preloaded data and metadata attached to" do
+ test "GET /:maybe_nickname_or_id", %{conn: conn} do
+ user = insert(:user)
+ user_missing = get(conn, "/foo")
+ user_present = get(conn, "/#{user.nickname}")
- assert conn
- |> get("/foo")
- |> html_response(200) =~ ""
+ assert(html_response(user_missing, 200) =~ "")
+ refute html_response(user_present, 200) =~ ""
+ assert html_response(user_present, 200) =~ "initial-results"
+ end
- refute conn
- |> get("/" <> user.nickname)
- |> html_response(200) =~ ""
+ test "GET /*path", %{conn: conn} do
+ assert conn
+ |> get("/foo")
+ |> html_response(200) =~ ""
+
+ refute conn
+ |> get("/foo/bar")
+ |> html_response(200) =~ ""
+ end
+ end
+
+ describe "preloaded data is attached to" do
+ test "GET /main/public", %{conn: conn} do
+ public_page = get(conn, "/main/public")
+
+ refute html_response(public_page, 200) =~ ""
+ assert html_response(public_page, 200) =~ "initial-results"
+ end
+
+ test "GET /main/all", %{conn: conn} do
+ public_page = get(conn, "/main/all")
+
+ refute html_response(public_page, 200) =~ ""
+ assert html_response(public_page, 200) =~ "initial-results"
+ end
end
test "GET /api*path", %{conn: conn} do
@@ -34,16 +68,6 @@ test "GET /pleroma/admin -> /pleroma/admin/", %{conn: conn} do
assert redirected_to(get(conn, "/pleroma/admin")) =~ "/pleroma/admin/"
end
- test "GET /*path", %{conn: conn} do
- assert conn
- |> get("/foo")
- |> html_response(200) =~ ""
-
- assert conn
- |> get("/foo/bar")
- |> html_response(200) =~ ""
- end
-
test "OPTIONS /*path", %{conn: conn} do
assert conn
|> options("/foo")
diff --git a/test/web/federator_test.exs b/test/web/federator_test.exs
index de90aa6e0..592fdccd1 100644
--- a/test/web/federator_test.exs
+++ b/test/web/federator_test.exs
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.FederatorTest do
setup_all do: clear_config([:instance, :federating], true)
setup do: clear_config([:instance, :allow_relay])
- setup do: clear_config([:instance, :rewrite_policy])
+ setup do: clear_config([:mrf, :policies])
setup do: clear_config([:mrf_keyword])
describe "Publish an activity" do
@@ -158,7 +158,7 @@ test "it does not crash if MRF rejects the post" do
Pleroma.Config.put([:mrf_keyword, :reject], ["lain"])
Pleroma.Config.put(
- [:instance, :rewrite_policy],
+ [:mrf, :policies],
Pleroma.Web.ActivityPub.MRF.KeywordPolicy
)
diff --git a/test/web/feed/tag_controller_test.exs b/test/web/feed/tag_controller_test.exs
index 3c29cd94f..868e40965 100644
--- a/test/web/feed/tag_controller_test.exs
+++ b/test/web/feed/tag_controller_test.exs
@@ -181,4 +181,17 @@ test "gets a feed (RSS)", %{conn: conn} do
'yeah #PleromaArt'
]
end
+
+ describe "private instance" do
+ setup do: clear_config([:instance, :public])
+
+ test "returns 404 for tags feed", %{conn: conn} do
+ Config.put([:instance, :public], false)
+
+ conn
+ |> put_req_header("accept", "application/rss+xml")
+ |> get(tag_feed_path(conn, :feed, "pleromaart"))
+ |> response(404)
+ end
+ end
end
diff --git a/test/web/feed/user_controller_test.exs b/test/web/feed/user_controller_test.exs
index fa2ed1ea5..9a5610baa 100644
--- a/test/web/feed/user_controller_test.exs
+++ b/test/web/feed/user_controller_test.exs
@@ -181,6 +181,17 @@ test "returns feed with public and unlisted activities", %{conn: conn} do
assert activity_titles == ['public', 'unlisted']
end
+
+ test "returns 404 when the user is remote", %{conn: conn} do
+ user = insert(:user, local: false)
+
+ {:ok, _} = CommonAPI.post(user, %{status: "test"})
+
+ assert conn
+ |> put_req_header("accept", "application/atom+xml")
+ |> get(user_feed_path(conn, :feed, user.nickname))
+ |> response(404)
+ end
end
# Note: see ActivityPubControllerTest for JSON format tests
@@ -235,4 +246,20 @@ test "with non-html / non-json format, it returns error when user is not found",
assert response == ~S({"error":"Not found"})
end
end
+
+ describe "private instance" do
+ setup do: clear_config([:instance, :public])
+
+ test "returns 404 for user feed", %{conn: conn} do
+ Config.put([:instance, :public], false)
+ user = insert(:user)
+
+ {:ok, _} = CommonAPI.post(user, %{status: "test"})
+
+ assert conn
+ |> put_req_header("accept", "application/atom+xml")
+ |> get(user_feed_path(conn, :feed, user.nickname))
+ |> response(404)
+ end
+ end
end
diff --git a/test/web/instances/instance_test.exs b/test/web/instances/instance_test.exs
index e463200ca..dc6ace843 100644
--- a/test/web/instances/instance_test.exs
+++ b/test/web/instances/instance_test.exs
@@ -8,6 +8,7 @@ defmodule Pleroma.Instances.InstanceTest do
use Pleroma.DataCase
+ import ExUnit.CaptureLog
import Pleroma.Factory
setup_all do: clear_config([:instance, :federation_reachability_timeout_days], 1)
@@ -97,4 +98,36 @@ test "does NOT modify `unreachable_since` value of existing record in case it's
assert initial_value == instance.unreachable_since
end
end
+
+ test "Scrapes favicon URLs" do
+ Tesla.Mock.mock(fn %{url: "https://favicon.example.org/"} ->
+ %Tesla.Env{
+ status: 200,
+ body: ~s[]
+ }
+ end)
+
+ assert "https://favicon.example.org/favicon.png" ==
+ Instance.get_or_update_favicon(URI.parse("https://favicon.example.org/"))
+ end
+
+ test "Returns nil on too long favicon URLs" do
+ long_favicon_url =
+ "https://Lorem.ipsum.dolor.sit.amet/consecteturadipiscingelit/Praesentpharetrapurusutaliquamtempus/Mauriseulaoreetarcu/atfacilisisorci/Nullamporttitor/nequesedfeugiatmollis/dolormagnaefficiturlorem/nonpretiumsapienorcieurisus/Nullamveleratsem/Maecenassedaccumsanexnam/favicon.png"
+
+ Tesla.Mock.mock(fn %{url: "https://long-favicon.example.org/"} ->
+ %Tesla.Env{
+ status: 200,
+ body: ~s[]
+ }
+ end)
+
+ assert capture_log(fn ->
+ assert nil ==
+ Instance.get_or_update_favicon(
+ URI.parse("https://long-favicon.example.org/")
+ )
+ end) =~
+ "Instance.get_or_update_favicon(\"long-favicon.example.org\") error: %Postgrex.Error{"
+ end
end
diff --git a/test/web/masto_fe_controller_test.exs b/test/web/masto_fe_controller_test.exs
index 1d107d56c..f3b54b5f2 100644
--- a/test/web/masto_fe_controller_test.exs
+++ b/test/web/masto_fe_controller_test.exs
@@ -24,7 +24,7 @@ test "put settings", %{conn: conn} do
assert _result = json_response(conn, 200)
user = User.get_cached_by_ap_id(user.ap_id)
- assert user.settings == %{"programming" => "socks"}
+ assert user.mastofe_settings == %{"programming" => "socks"}
end
describe "index/2 redirections" do
diff --git a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
index 7c420985d..2e6704726 100644
--- a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
@@ -83,10 +83,9 @@ test "sets user settings in a generic way", %{conn: conn} do
test "updates the user's bio", %{conn: conn} do
user2 = insert(:user)
- conn =
- patch(conn, "/api/v1/accounts/update_credentials", %{
- "note" => "I drink #cofe with @#{user2.nickname}\n\nsuya.."
- })
+ raw_bio = "I drink #cofe with @#{user2.nickname}\n\nsuya.."
+
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{"note" => raw_bio})
assert user_data = json_response_and_validate_schema(conn, 200)
@@ -94,6 +93,12 @@ test "updates the user's bio", %{conn: conn} do
~s(I drink #cofe with @#{user2.nickname}
suya..)
+
+ assert user_data["source"]["note"] == raw_bio
+
+ user = Repo.get(User, user_data["id"])
+
+ assert user.raw_bio == raw_bio
end
test "updates the user's locking status", %{conn: conn} do
@@ -103,6 +108,13 @@ test "updates the user's locking status", %{conn: conn} do
assert user_data["locked"] == true
end
+ test "updates the user's chat acceptance status", %{conn: conn} do
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{accepts_chat_messages: "false"})
+
+ assert user_data = json_response_and_validate_schema(conn, 200)
+ assert user_data["pleroma"]["accepts_chat_messages"] == false
+ end
+
test "updates the user's allow_following_move", %{user: user, conn: conn} do
assert user.allow_following_move == true
@@ -202,6 +214,10 @@ test "updates the user's name", %{conn: conn} do
assert user_data = json_response_and_validate_schema(conn, 200)
assert user_data["display_name"] == "markorepairs"
+
+ update_activity = Repo.one(Pleroma.Activity)
+ assert update_activity.data["type"] == "Update"
+ assert update_activity.data["object"]["name"] == "markorepairs"
end
test "updates the user's avatar", %{user: user, conn: conn} do
@@ -211,10 +227,21 @@ test "updates the user's avatar", %{user: user, conn: conn} do
filename: "an_image.jpg"
}
- conn = patch(conn, "/api/v1/accounts/update_credentials", %{"avatar" => new_avatar})
+ assert user.avatar == %{}
- assert user_response = json_response_and_validate_schema(conn, 200)
+ res = patch(conn, "/api/v1/accounts/update_credentials", %{"avatar" => new_avatar})
+
+ assert user_response = json_response_and_validate_schema(res, 200)
assert user_response["avatar"] != User.avatar_url(user)
+
+ user = User.get_by_id(user.id)
+ refute user.avatar == %{}
+
+ # Also resets it
+ _res = patch(conn, "/api/v1/accounts/update_credentials", %{"avatar" => ""})
+
+ user = User.get_by_id(user.id)
+ assert user.avatar == nil
end
test "updates the user's banner", %{user: user, conn: conn} do
@@ -224,26 +251,39 @@ test "updates the user's banner", %{user: user, conn: conn} do
filename: "an_image.jpg"
}
- conn = patch(conn, "/api/v1/accounts/update_credentials", %{"header" => new_header})
+ res = patch(conn, "/api/v1/accounts/update_credentials", %{"header" => new_header})
- assert user_response = json_response_and_validate_schema(conn, 200)
+ assert user_response = json_response_and_validate_schema(res, 200)
assert user_response["header"] != User.banner_url(user)
+
+ # Also resets it
+ _res = patch(conn, "/api/v1/accounts/update_credentials", %{"header" => ""})
+
+ user = User.get_by_id(user.id)
+ assert user.banner == nil
end
- test "updates the user's background", %{conn: conn} do
+ test "updates the user's background", %{conn: conn, user: user} do
new_header = %Plug.Upload{
content_type: "image/jpg",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
- conn =
+ res =
patch(conn, "/api/v1/accounts/update_credentials", %{
"pleroma_background_image" => new_header
})
- assert user_response = json_response_and_validate_schema(conn, 200)
+ assert user_response = json_response_and_validate_schema(res, 200)
assert user_response["pleroma"]["background_image"]
+ #
+ # Also resets it
+ _res =
+ patch(conn, "/api/v1/accounts/update_credentials", %{"pleroma_background_image" => ""})
+
+ user = User.get_by_id(user.id)
+ assert user.background == nil
end
test "requires 'write:accounts' permission" do
@@ -315,6 +355,30 @@ test "update fields", %{conn: conn} do
]
end
+ test "emojis in fields labels", %{conn: conn} do
+ fields = [
+ %{"name" => ":firefox:", "value" => "is best 2hu"},
+ %{"name" => "they wins", "value" => ":blank:"}
+ ]
+
+ account_data =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
+ |> json_response_and_validate_schema(200)
+
+ assert account_data["fields"] == [
+ %{"name" => ":firefox:", "value" => "is best 2hu"},
+ %{"name" => "they wins", "value" => ":blank:"}
+ ]
+
+ assert account_data["source"]["fields"] == [
+ %{"name" => ":firefox:", "value" => "is best 2hu"},
+ %{"name" => "they wins", "value" => ":blank:"}
+ ]
+
+ assert [%{"shortcode" => "blank"}, %{"shortcode" => "firefox"}] = account_data["emojis"]
+ end
+
test "update fields via x-www-form-urlencoded", %{conn: conn} do
fields =
[
@@ -395,4 +459,71 @@ test "update fields when invalid request", %{conn: conn} do
|> json_response_and_validate_schema(403)
end
end
+
+ describe "Mark account as bot" do
+ setup do: oauth_access(["write:accounts"])
+ setup :request_content_type
+
+ test "changing actor_type to Service makes account a bot", %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{actor_type: "Service"})
+ |> json_response_and_validate_schema(200)
+
+ assert account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Service"
+ end
+
+ test "changing actor_type to Person makes account a human", %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{actor_type: "Person"})
+ |> json_response_and_validate_schema(200)
+
+ refute account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Person"
+ end
+
+ test "changing actor_type to Application causes error", %{conn: conn} do
+ response =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{actor_type: "Application"})
+ |> json_response_and_validate_schema(403)
+
+ assert %{"error" => "Invalid request"} == response
+ end
+
+ test "changing bot field to true changes actor_type to Service", %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{bot: "true"})
+ |> json_response_and_validate_schema(200)
+
+ assert account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Service"
+ end
+
+ test "changing bot field to false changes actor_type to Person", %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{bot: "false"})
+ |> json_response_and_validate_schema(200)
+
+ refute account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Person"
+ end
+
+ test "actor_type field has a higher priority than bot", %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{
+ actor_type: "Person",
+ bot: "true"
+ })
+ |> json_response_and_validate_schema(200)
+
+ refute account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Person"
+ end
+ end
end
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 1ce97378d..17a1e7d66 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -5,7 +5,6 @@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
use Pleroma.Web.ConnCase
- alias Pleroma.Config
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
@@ -16,8 +15,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
import Pleroma.Factory
describe "account fetching" do
- setup do: clear_config([:instance, :limit_to_local_content])
-
test "works by id" do
%User{id: user_id} = insert(:user)
@@ -42,7 +39,7 @@ test "works by nickname" do
end
test "works by nickname for remote users" do
- Config.put([:instance, :limit_to_local_content], false)
+ clear_config([:instance, :limit_to_local_content], false)
user = insert(:user, nickname: "user@example.com", local: false)
@@ -53,7 +50,7 @@ test "works by nickname for remote users" do
end
test "respects limit_to_local_content == :all for remote user nicknames" do
- Config.put([:instance, :limit_to_local_content], :all)
+ clear_config([:instance, :limit_to_local_content], :all)
user = insert(:user, nickname: "user@example.com", local: false)
@@ -63,7 +60,7 @@ test "respects limit_to_local_content == :all for remote user nicknames" do
end
test "respects limit_to_local_content == :unauthenticated for remote user nicknames" do
- Config.put([:instance, :limit_to_local_content], :unauthenticated)
+ clear_config([:instance, :limit_to_local_content], :unauthenticated)
user = insert(:user, nickname: "user@example.com", local: false)
reading_user = insert(:user)
@@ -127,6 +124,15 @@ test "returns 404 for internal.fetch actor", %{conn: conn} do
|> get("/api/v1/accounts/internal.fetch")
|> json_response_and_validate_schema(404)
end
+
+ test "returns 404 for deactivated user", %{conn: conn} do
+ user = insert(:user, deactivated: true)
+
+ assert %{"error" => "Can't find user"} =
+ conn
+ |> get("/api/v1/accounts/#{user.id}")
+ |> json_response_and_validate_schema(:not_found)
+ end
end
defp local_and_remote_users do
@@ -143,15 +149,15 @@ defp local_and_remote_users do
setup do: clear_config([:restrict_unauthenticated, :profiles, :remote], true)
test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} do
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{local.id}")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{remote.id}")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
end
test "if user is authenticated", %{local: local, remote: remote} do
@@ -173,8 +179,8 @@ test "if user is authenticated", %{local: local, remote: remote} do
test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} do
res_conn = get(conn, "/api/v1/accounts/#{local.id}")
- assert json_response_and_validate_schema(res_conn, :not_found) == %{
- "error" => "Can't find user"
+ assert json_response_and_validate_schema(res_conn, :unauthorized) == %{
+ "error" => "This API requires an authenticated user"
}
res_conn = get(conn, "/api/v1/accounts/#{remote.id}")
@@ -203,8 +209,8 @@ test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} d
res_conn = get(conn, "/api/v1/accounts/#{remote.id}")
- assert json_response_and_validate_schema(res_conn, :not_found) == %{
- "error" => "Can't find user"
+ assert json_response_and_validate_schema(res_conn, :unauthorized) == %{
+ "error" => "This API requires an authenticated user"
}
end
@@ -249,6 +255,24 @@ test "works with announces that are just addressed to public", %{conn: conn} do
assert id == announce.id
end
+ test "deactivated user", %{conn: conn} do
+ user = insert(:user, deactivated: true)
+
+ assert %{"error" => "Can't find user"} ==
+ conn
+ |> get("/api/v1/accounts/#{user.id}/statuses")
+ |> json_response_and_validate_schema(:not_found)
+ end
+
+ test "returns 404 when user is invisible", %{conn: conn} do
+ user = insert(:user, %{invisible: true})
+
+ assert %{"error" => "Can't find user"} =
+ conn
+ |> get("/api/v1/accounts/#{user.id}")
+ |> json_response_and_validate_schema(404)
+ end
+
test "respects blocks", %{user: user_one, conn: conn} do
user_two = insert(:user)
user_three = insert(:user)
@@ -350,9 +374,10 @@ test "unimplemented pinned statuses feature", %{conn: conn} do
assert json_response_and_validate_schema(conn, 200) == []
end
- test "gets an users media", %{conn: conn} do
+ test "gets an users media, excludes reblogs", %{conn: conn} do
note = insert(:note_activity)
user = User.get_cached_by_ap_id(note.data["actor"])
+ other_user = insert(:user)
file = %Plug.Upload{
content_type: "image/jpg",
@@ -364,6 +389,13 @@ test "gets an users media", %{conn: conn} do
{:ok, %{id: image_post_id}} = CommonAPI.post(user, %{status: "cofe", media_ids: [media_id]})
+ {:ok, %{id: media_id}} = ActivityPub.upload(file, actor: other_user.ap_id)
+
+ {:ok, %{id: other_image_post_id}} =
+ CommonAPI.post(other_user, %{status: "cofe2", media_ids: [media_id]})
+
+ {:ok, _announce} = CommonAPI.repeat(other_image_post_id, user)
+
conn = get(conn, "/api/v1/accounts/#{user.id}/statuses?only_media=true")
assert [%{"id" => ^image_post_id}] = json_response_and_validate_schema(conn, 200)
@@ -422,15 +454,15 @@ defp local_and_remote_activities(%{local: local, remote: remote}) do
setup do: clear_config([:restrict_unauthenticated, :profiles, :remote], true)
test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} do
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{local.id}/statuses")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{remote.id}/statuses")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
end
test "if user is authenticated", %{local: local, remote: remote} do
@@ -451,10 +483,10 @@ test "if user is authenticated", %{local: local, remote: remote} do
setup do: clear_config([:restrict_unauthenticated, :profiles, :local], true)
test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} do
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{local.id}/statuses")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
res_conn = get(conn, "/api/v1/accounts/#{remote.id}/statuses")
assert length(json_response_and_validate_schema(res_conn, 200)) == 1
@@ -481,10 +513,10 @@ test "if user is unauthenticated", %{conn: conn, local: local, remote: remote} d
res_conn = get(conn, "/api/v1/accounts/#{local.id}/statuses")
assert length(json_response_and_validate_schema(res_conn, 200)) == 1
- assert %{"error" => "Can't find user"} ==
+ assert %{"error" => "This API requires an authenticated user"} ==
conn
|> get("/api/v1/accounts/#{remote.id}/statuses")
- |> json_response_and_validate_schema(:not_found)
+ |> json_response_and_validate_schema(:unauthorized)
end
test "if user is authenticated", %{local: local, remote: remote} do
@@ -548,6 +580,15 @@ test "getting followers, pagination", %{user: user, conn: conn} do
|> get("/api/v1/accounts/#{user.id}/followers?max_id=#{follower3_id}")
|> json_response_and_validate_schema(200)
+ assert [%{"id" => ^follower2_id}, %{"id" => ^follower1_id}] =
+ conn
+ |> get(
+ "/api/v1/accounts/#{user.id}/followers?id=#{user.id}&limit=20&max_id=#{
+ follower3_id
+ }"
+ )
+ |> json_response_and_validate_schema(200)
+
res_conn = get(conn, "/api/v1/accounts/#{user.id}/followers?limit=1&max_id=#{follower3_id}")
assert [%{"id" => ^follower2_id}] = json_response_and_validate_schema(res_conn, 200)
@@ -619,6 +660,16 @@ test "getting following, pagination", %{user: user, conn: conn} do
assert id2 == following2.id
assert id1 == following1.id
+ res_conn =
+ get(
+ conn,
+ "/api/v1/accounts/#{user.id}/following?id=#{user.id}&limit=20&max_id=#{following3.id}"
+ )
+
+ assert [%{"id" => id2}, %{"id" => id1}] = json_response_and_validate_schema(res_conn, 200)
+ assert id2 == following2.id
+ assert id1 == following1.id
+
res_conn =
get(conn, "/api/v1/accounts/#{user.id}/following?limit=1&max_id=#{following3.id}")
@@ -673,7 +724,10 @@ test "following without reblogs" do
followed = insert(:user)
other_user = insert(:user)
- ret_conn = post(conn, "/api/v1/accounts/#{followed.id}/follow?reblogs=false")
+ ret_conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/accounts/#{followed.id}/follow", %{reblogs: false})
assert %{"showing_reblogs" => false} = json_response_and_validate_schema(ret_conn, 200)
@@ -687,7 +741,8 @@ test "following without reblogs" do
assert %{"showing_reblogs" => true} =
conn
- |> post("/api/v1/accounts/#{followed.id}/follow?reblogs=true")
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/accounts/#{followed.id}/follow", %{reblogs: true})
|> json_response_and_validate_schema(200)
assert [%{"id" => ^reblog_id}] =
@@ -696,6 +751,35 @@ test "following without reblogs" do
|> json_response(200)
end
+ test "following with reblogs" do
+ %{conn: conn} = oauth_access(["follow", "read:statuses"])
+ followed = insert(:user)
+ other_user = insert(:user)
+
+ ret_conn = post(conn, "/api/v1/accounts/#{followed.id}/follow")
+
+ assert %{"showing_reblogs" => true} = json_response_and_validate_schema(ret_conn, 200)
+
+ {:ok, activity} = CommonAPI.post(other_user, %{status: "hey"})
+ {:ok, %{id: reblog_id}} = CommonAPI.repeat(activity.id, followed)
+
+ assert [%{"id" => ^reblog_id}] =
+ conn
+ |> get("/api/v1/timelines/home")
+ |> json_response(200)
+
+ assert %{"showing_reblogs" => false} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/accounts/#{followed.id}/follow", %{reblogs: false})
+ |> json_response_and_validate_schema(200)
+
+ assert [] ==
+ conn
+ |> get("/api/v1/timelines/home")
+ |> json_response(200)
+ end
+
test "following / unfollowing errors", %{user: user, conn: conn} do
# self follow
conn_res = post(conn, "/api/v1/accounts/#{user.id}/follow")
@@ -745,7 +829,6 @@ test "with notifications", %{conn: conn} do
assert %{"id" => _id, "muting" => true, "muting_notifications" => true} =
conn
- |> put_req_header("content-type", "application/json")
|> post("/api/v1/accounts/#{other_user.id}/mute")
|> json_response_and_validate_schema(200)
@@ -817,9 +900,93 @@ test "blocking / unblocking a user" do
[valid_params: valid_params]
end
- setup do: clear_config([:instance, :account_activation_required])
+ test "registers and logs in without :account_activation_required / :account_approval_required",
+ %{conn: conn} do
+ clear_config([:instance, :account_activation_required], false)
+ clear_config([:instance, :account_approval_required], false)
+
+ conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/apps", %{
+ client_name: "client_name",
+ redirect_uris: "urn:ietf:wg:oauth:2.0:oob",
+ scopes: "read, write, follow"
+ })
+
+ assert %{
+ "client_id" => client_id,
+ "client_secret" => client_secret,
+ "id" => _,
+ "name" => "client_name",
+ "redirect_uri" => "urn:ietf:wg:oauth:2.0:oob",
+ "vapid_key" => _,
+ "website" => nil
+ } = json_response_and_validate_schema(conn, 200)
+
+ conn =
+ post(conn, "/oauth/token", %{
+ grant_type: "client_credentials",
+ client_id: client_id,
+ client_secret: client_secret
+ })
+
+ assert %{"access_token" => token, "refresh_token" => refresh, "scope" => scope} =
+ json_response(conn, 200)
+
+ assert token
+ token_from_db = Repo.get_by(Token, token: token)
+ assert token_from_db
+ assert refresh
+ assert scope == "read write follow"
+
+ clear_config([User, :email_blacklist], ["example.org"])
+
+ params = %{
+ username: "lain",
+ email: "lain@example.org",
+ password: "PlzDontHackLain",
+ bio: "Test Bio",
+ agreement: true
+ }
+
+ conn =
+ build_conn()
+ |> put_req_header("content-type", "multipart/form-data")
+ |> put_req_header("authorization", "Bearer " <> token)
+ |> post("/api/v1/accounts", params)
+
+ assert %{"error" => "{\"email\":[\"Invalid email\"]}"} =
+ json_response_and_validate_schema(conn, 400)
+
+ Pleroma.Config.put([User, :email_blacklist], [])
+
+ conn =
+ build_conn()
+ |> put_req_header("content-type", "multipart/form-data")
+ |> put_req_header("authorization", "Bearer " <> token)
+ |> post("/api/v1/accounts", params)
+
+ %{
+ "access_token" => token,
+ "created_at" => _created_at,
+ "scope" => ^scope,
+ "token_type" => "Bearer"
+ } = json_response_and_validate_schema(conn, 200)
+
+ token_from_db = Repo.get_by(Token, token: token)
+ assert token_from_db
+ user = Repo.preload(token_from_db, :user).user
+
+ assert user
+ refute user.confirmation_pending
+ refute user.approval_pending
+ end
+
+ test "registers but does not log in with :account_activation_required", %{conn: conn} do
+ clear_config([:instance, :account_activation_required], true)
+ clear_config([:instance, :account_approval_required], false)
- test "Account registration via Application", %{conn: conn} do
conn =
conn
|> put_req_header("content-type", "application/json")
@@ -867,19 +1034,76 @@ test "Account registration via Application", %{conn: conn} do
agreement: true
})
- %{
- "access_token" => token,
- "created_at" => _created_at,
- "scope" => _scope,
- "token_type" => "Bearer"
- } = json_response_and_validate_schema(conn, 200)
+ response = json_response_and_validate_schema(conn, 200)
+ assert %{"identifier" => "missing_confirmed_email"} = response
+ refute response["access_token"]
+ refute response["token_type"]
+ user = Repo.get_by(User, email: "lain@example.org")
+ assert user.confirmation_pending
+ end
+
+ test "registers but does not log in with :account_approval_required", %{conn: conn} do
+ clear_config([:instance, :account_approval_required], true)
+ clear_config([:instance, :account_activation_required], false)
+
+ conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/apps", %{
+ client_name: "client_name",
+ redirect_uris: "urn:ietf:wg:oauth:2.0:oob",
+ scopes: "read, write, follow"
+ })
+
+ assert %{
+ "client_id" => client_id,
+ "client_secret" => client_secret,
+ "id" => _,
+ "name" => "client_name",
+ "redirect_uri" => "urn:ietf:wg:oauth:2.0:oob",
+ "vapid_key" => _,
+ "website" => nil
+ } = json_response_and_validate_schema(conn, 200)
+
+ conn =
+ post(conn, "/oauth/token", %{
+ grant_type: "client_credentials",
+ client_id: client_id,
+ client_secret: client_secret
+ })
+
+ assert %{"access_token" => token, "refresh_token" => refresh, "scope" => scope} =
+ json_response(conn, 200)
+
+ assert token
token_from_db = Repo.get_by(Token, token: token)
assert token_from_db
- token_from_db = Repo.preload(token_from_db, :user)
- assert token_from_db.user
+ assert refresh
+ assert scope == "read write follow"
- assert token_from_db.user.confirmation_pending
+ conn =
+ build_conn()
+ |> put_req_header("content-type", "multipart/form-data")
+ |> put_req_header("authorization", "Bearer " <> token)
+ |> post("/api/v1/accounts", %{
+ username: "lain",
+ email: "lain@example.org",
+ password: "PlzDontHackLain",
+ bio: "Test Bio",
+ agreement: true,
+ reason: "I'm a cool dude, bro"
+ })
+
+ response = json_response_and_validate_schema(conn, 200)
+ assert %{"identifier" => "awaiting_approval"} = response
+ refute response["access_token"]
+ refute response["token_type"]
+
+ user = Repo.get_by(User, email: "lain@example.org")
+
+ assert user.approval_pending
+ assert user.registration_reason == "I'm a cool dude, bro"
end
test "returns error when user already registred", %{conn: conn, valid_params: valid_params} do
@@ -933,11 +1157,9 @@ test "returns bad_request if missing required params", %{
end)
end
- setup do: clear_config([:instance, :account_activation_required])
-
test "returns bad_request if missing email params when :account_activation_required is enabled",
%{conn: conn, valid_params: valid_params} do
- Pleroma.Config.put([:instance, :account_activation_required], true)
+ clear_config([:instance, :account_activation_required], true)
app_token = insert(:oauth_token, user: nil)
@@ -1032,7 +1254,7 @@ test "registration from trusted app" do
assert %{
"access_token" => access_token,
"created_at" => _,
- "scope" => ["read", "write", "follow", "push"],
+ "scope" => "read write follow push",
"token_type" => "Bearer"
} = response
@@ -1102,8 +1324,6 @@ test "respects rate limit setting", %{conn: conn} do
assert token_from_db
token_from_db = Repo.preload(token_from_db, :user)
assert token_from_db.user
-
- assert token_from_db.user.confirmation_pending
end
conn =
@@ -1150,7 +1370,7 @@ test "creates an account and returns 200 if captcha is valid", %{conn: conn} do
assert %{
"access_token" => access_token,
"created_at" => _,
- "scope" => ["read"],
+ "scope" => "read",
"token_type" => "Bearer"
} =
conn
diff --git a/test/web/mastodon_api/controllers/auth_controller_test.exs b/test/web/mastodon_api/controllers/auth_controller_test.exs
index a485f8e41..4fa95fce1 100644
--- a/test/web/mastodon_api/controllers/auth_controller_test.exs
+++ b/test/web/mastodon_api/controllers/auth_controller_test.exs
@@ -122,17 +122,27 @@ test "it doesn't fail when a user has no email", %{conn: conn} do
{:ok, user: user}
end
- test "it returns 404 when user is not found", %{conn: conn, user: user} do
+ test "it returns 204 when user is not found", %{conn: conn, user: user} do
conn = post(conn, "/auth/password?email=nonexisting_#{user.email}")
- assert conn.status == 404
- assert conn.resp_body == ""
+
+ assert conn
+ |> json_response(:no_content)
end
- test "it returns 400 when user is not local", %{conn: conn, user: user} do
+ test "it returns 204 when user is not local", %{conn: conn, user: user} do
{:ok, user} = Repo.update(Ecto.Changeset.change(user, local: false))
conn = post(conn, "/auth/password?email=#{user.email}")
- assert conn.status == 400
- assert conn.resp_body == ""
+
+ assert conn
+ |> json_response(:no_content)
+ end
+
+ test "it returns 204 when user is deactivated", %{conn: conn, user: user} do
+ {:ok, user} = Repo.update(Ecto.Changeset.change(user, deactivated: true, local: true))
+ conn = post(conn, "/auth/password?email=#{user.email}")
+
+ assert conn
+ |> json_response(:no_content)
end
end
diff --git a/test/web/mastodon_api/controllers/domain_block_controller_test.exs b/test/web/mastodon_api/controllers/domain_block_controller_test.exs
index 01a24afcf..664654500 100644
--- a/test/web/mastodon_api/controllers/domain_block_controller_test.exs
+++ b/test/web/mastodon_api/controllers/domain_block_controller_test.exs
@@ -32,6 +32,38 @@ test "blocking / unblocking a domain" do
refute User.blocks?(user, other_user)
end
+ test "blocking a domain via query params" do
+ %{user: user, conn: conn} = oauth_access(["write:blocks"])
+ other_user = insert(:user, %{ap_id: "https://dogwhistle.zone/@pundit"})
+
+ ret_conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/domain_blocks?domain=dogwhistle.zone")
+
+ assert %{} == json_response_and_validate_schema(ret_conn, 200)
+ user = User.get_cached_by_ap_id(user.ap_id)
+ assert User.blocks?(user, other_user)
+ end
+
+ test "unblocking a domain via query params" do
+ %{user: user, conn: conn} = oauth_access(["write:blocks"])
+ other_user = insert(:user, %{ap_id: "https://dogwhistle.zone/@pundit"})
+
+ User.block_domain(user, "dogwhistle.zone")
+ user = refresh_record(user)
+ assert User.blocks?(user, other_user)
+
+ ret_conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> delete("/api/v1/domain_blocks?domain=dogwhistle.zone")
+
+ assert %{} == json_response_and_validate_schema(ret_conn, 200)
+ user = User.get_cached_by_ap_id(user.ap_id)
+ refute User.blocks?(user, other_user)
+ end
+
test "getting a list of domain blocks" do
%{user: user, conn: conn} = oauth_access(["read:blocks"])
diff --git a/test/web/mastodon_api/controllers/filter_controller_test.exs b/test/web/mastodon_api/controllers/filter_controller_test.exs
index f29547d13..0d426ec34 100644
--- a/test/web/mastodon_api/controllers/filter_controller_test.exs
+++ b/test/web/mastodon_api/controllers/filter_controller_test.exs
@@ -64,11 +64,13 @@ test "fetching a list of filters" do
test "get a filter" do
%{user: user, conn: conn} = oauth_access(["read:filters"])
+ # check whole_word false
query = %Pleroma.Filter{
user_id: user.id,
filter_id: 2,
phrase: "knight",
- context: ["home"]
+ context: ["home"],
+ whole_word: false
}
{:ok, filter} = Pleroma.Filter.create(query)
@@ -76,6 +78,25 @@ test "get a filter" do
conn = get(conn, "/api/v1/filters/#{filter.filter_id}")
assert response = json_response_and_validate_schema(conn, 200)
+ assert response["whole_word"] == false
+
+ # check whole_word true
+ %{user: user, conn: conn} = oauth_access(["read:filters"])
+
+ query = %Pleroma.Filter{
+ user_id: user.id,
+ filter_id: 3,
+ phrase: "knight",
+ context: ["home"],
+ whole_word: true
+ }
+
+ {:ok, filter} = Pleroma.Filter.create(query)
+
+ conn = get(conn, "/api/v1/filters/#{filter.filter_id}")
+
+ assert response = json_response_and_validate_schema(conn, 200)
+ assert response["whole_word"] == true
end
test "update a filter" do
@@ -86,7 +107,8 @@ test "update a filter" do
filter_id: 2,
phrase: "knight",
context: ["home"],
- hide: true
+ hide: true,
+ whole_word: true
}
{:ok, _filter} = Pleroma.Filter.create(query)
@@ -108,6 +130,7 @@ test "update a filter" do
assert response["phrase"] == new.phrase
assert response["context"] == new.context
assert response["irreversible"] == true
+ assert response["whole_word"] == true
end
test "delete a filter" do
diff --git a/test/web/mastodon_api/controllers/follow_request_controller_test.exs b/test/web/mastodon_api/controllers/follow_request_controller_test.exs
index 44e12d15a..6749e0e83 100644
--- a/test/web/mastodon_api/controllers/follow_request_controller_test.exs
+++ b/test/web/mastodon_api/controllers/follow_request_controller_test.exs
@@ -6,7 +6,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
use Pleroma.Web.ConnCase
alias Pleroma.User
- alias Pleroma.Web.ActivityPub.ActivityPub
+ alias Pleroma.Web.CommonAPI
import Pleroma.Factory
@@ -20,7 +20,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
test "/api/v1/follow_requests works", %{user: user, conn: conn} do
other_user = insert(:user)
- {:ok, _activity} = ActivityPub.follow(other_user, user)
+ {:ok, _, _, _activity} = CommonAPI.follow(other_user, user)
{:ok, other_user} = User.follow(other_user, user, :follow_pending)
assert User.following?(other_user, user) == false
@@ -34,7 +34,7 @@ test "/api/v1/follow_requests works", %{user: user, conn: conn} do
test "/api/v1/follow_requests/:id/authorize works", %{user: user, conn: conn} do
other_user = insert(:user)
- {:ok, _activity} = ActivityPub.follow(other_user, user)
+ {:ok, _, _, _activity} = CommonAPI.follow(other_user, user)
{:ok, other_user} = User.follow(other_user, user, :follow_pending)
user = User.get_cached_by_id(user.id)
@@ -56,7 +56,7 @@ test "/api/v1/follow_requests/:id/authorize works", %{user: user, conn: conn} do
test "/api/v1/follow_requests/:id/reject works", %{user: user, conn: conn} do
other_user = insert(:user)
- {:ok, _activity} = ActivityPub.follow(other_user, user)
+ {:ok, _, _, _activity} = CommonAPI.follow(other_user, user)
user = User.get_cached_by_id(user.id)
diff --git a/test/web/mastodon_api/controllers/instance_controller_test.exs b/test/web/mastodon_api/controllers/instance_controller_test.exs
index 8bdfdddd1..6a9ccd979 100644
--- a/test/web/mastodon_api/controllers/instance_controller_test.exs
+++ b/test/web/mastodon_api/controllers/instance_controller_test.exs
@@ -27,16 +27,21 @@ test "get instance information", %{conn: conn} do
"thumbnail" => _,
"languages" => _,
"registrations" => _,
+ "approval_required" => _,
"poll_limits" => _,
"upload_limit" => _,
"avatar_upload_limit" => _,
"background_upload_limit" => _,
"banner_upload_limit" => _,
- "background_image" => _
+ "background_image" => _,
+ "chat_limit" => _,
+ "description_limit" => _
} = result
+ assert result["pleroma"]["metadata"]["account_activation_required"] != nil
assert result["pleroma"]["metadata"]["features"]
assert result["pleroma"]["metadata"]["federation"]
+ assert result["pleroma"]["metadata"]["fields_limits"]
assert result["pleroma"]["vapid_public_key"]
assert email == from_config_email
diff --git a/test/web/mastodon_api/controllers/list_controller_test.exs b/test/web/mastodon_api/controllers/list_controller_test.exs
index 57a9ef4a4..091ec006c 100644
--- a/test/web/mastodon_api/controllers/list_controller_test.exs
+++ b/test/web/mastodon_api/controllers/list_controller_test.exs
@@ -67,7 +67,7 @@ test "adding users to a list" do
assert following == [other_user.follower_address]
end
- test "removing users from a list" do
+ test "removing users from a list, body params" do
%{user: user, conn: conn} = oauth_access(["write:lists"])
other_user = insert(:user)
third_user = insert(:user)
@@ -85,6 +85,24 @@ test "removing users from a list" do
assert following == [third_user.follower_address]
end
+ test "removing users from a list, query params" do
+ %{user: user, conn: conn} = oauth_access(["write:lists"])
+ other_user = insert(:user)
+ third_user = insert(:user)
+ {:ok, list} = Pleroma.List.create("name", user)
+ {:ok, list} = Pleroma.List.follow(list, other_user)
+ {:ok, list} = Pleroma.List.follow(list, third_user)
+
+ assert %{} ==
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> delete("/api/v1/lists/#{list.id}/accounts?account_ids[]=#{other_user.id}")
+ |> json_response_and_validate_schema(:ok)
+
+ %Pleroma.List{following: following} = Pleroma.List.get(list.id, user)
+ assert following == [third_user.follower_address]
+ end
+
test "listing users in a list" do
%{user: user, conn: conn} = oauth_access(["read:lists"])
other_user = insert(:user)
diff --git a/test/web/mastodon_api/controllers/search_controller_test.exs b/test/web/mastodon_api/controllers/search_controller_test.exs
index c605957b1..04dc6f445 100644
--- a/test/web/mastodon_api/controllers/search_controller_test.exs
+++ b/test/web/mastodon_api/controllers/search_controller_test.exs
@@ -79,6 +79,7 @@ test "search", %{conn: conn} do
assert status["id"] == to_string(activity.id)
end
+ @tag capture_log: true
test "constructs hashtags from search query", %{conn: conn} do
results =
conn
@@ -151,6 +152,22 @@ test "constructs hashtags from search query", %{conn: conn} do
]
end
+ test "supports pagination of hashtags search results", %{conn: conn} do
+ results =
+ conn
+ |> get(
+ "/api/v2/search?#{
+ URI.encode_query(%{q: "#some #text #with #hashtags", limit: 2, offset: 1})
+ }"
+ )
+ |> json_response_and_validate_schema(200)
+
+ assert results["hashtags"] == [
+ %{"name" => "text", "url" => "#{Web.base_url()}/tag/text"},
+ %{"name" => "with", "url" => "#{Web.base_url()}/tag/with"}
+ ]
+ end
+
test "excludes a blocked users from search results", %{conn: conn} do
user = insert(:user)
user_smith = insert(:user, %{nickname: "Agent", name: "I love 2hu"})
@@ -265,18 +282,18 @@ test "search fetches remote statuses and prefers them over other results", %{con
capture_log(fn ->
{:ok, %{id: activity_id}} =
CommonAPI.post(insert(:user), %{
- status: "check out https://shitposter.club/notice/2827873"
+ status: "check out http://mastodon.example.org/@admin/99541947525187367"
})
results =
conn
- |> get("/api/v1/search?q=https://shitposter.club/notice/2827873")
+ |> get("/api/v1/search?q=http://mastodon.example.org/@admin/99541947525187367")
|> json_response_and_validate_schema(200)
- [status, %{"id" => ^activity_id}] = results["statuses"]
-
- assert status["uri"] ==
- "tag:shitposter.club,2017-05-05:noticeId=2827873:objectType=comment"
+ assert [
+ %{"url" => "http://mastodon.example.org/@admin/99541947525187367"},
+ %{"id" => ^activity_id}
+ ] = results["statuses"]
end)
end
@@ -302,11 +319,13 @@ test "search doesn't show statuses that it shouldn't", %{conn: conn} do
test "search fetches remote accounts", %{conn: conn} do
user = insert(:user)
+ query = URI.encode_query(%{q: " mike@osada.macgirvin.com ", resolve: true})
+
results =
conn
|> assign(:user, user)
|> assign(:token, insert(:oauth_token, user: user, scopes: ["read"]))
- |> get("/api/v1/search?q=mike@osada.macgirvin.com&resolve=true")
+ |> get("/api/v1/search?#{query}")
|> json_response_and_validate_schema(200)
[account] = results["accounts"]
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs
index 648e6f2ce..633a25e50 100644
--- a/test/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/web/mastodon_api/controllers/status_controller_test.exs
@@ -4,9 +4,9 @@
defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
use Pleroma.Web.ConnCase
+ use Oban.Testing, repo: Pleroma.Repo
alias Pleroma.Activity
- alias Pleroma.ActivityExpiration
alias Pleroma.Config
alias Pleroma.Conversation.Participation
alias Pleroma.Object
@@ -22,13 +22,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
setup do: clear_config([:instance, :federating])
setup do: clear_config([:instance, :allow_relay])
setup do: clear_config([:rich_media, :enabled])
+ setup do: clear_config([:mrf, :policies])
+ setup do: clear_config([:mrf_keyword, :reject])
describe "posting statuses" do
setup do: oauth_access(["write:statuses"])
test "posting a status does not increment reblog_count when relaying", %{conn: conn} do
- Pleroma.Config.put([:instance, :federating], true)
- Pleroma.Config.get([:instance, :allow_relay], true)
+ Config.put([:instance, :federating], true)
+ Config.get([:instance, :allow_relay], true)
response =
conn
@@ -101,7 +103,9 @@ test "posting a status", %{conn: conn} do
# An activity that will expire:
# 2 hours
- expires_in = 120 * 60
+ expires_in = 2 * 60 * 60
+
+ expires_at = DateTime.add(DateTime.utc_now(), expires_in)
conn_four =
conn
@@ -111,29 +115,22 @@ test "posting a status", %{conn: conn} do
"expires_in" => expires_in
})
- assert fourth_response =
- %{"id" => fourth_id} = json_response_and_validate_schema(conn_four, 200)
+ assert %{"id" => fourth_id} = json_response_and_validate_schema(conn_four, 200)
- assert activity = Activity.get_by_id(fourth_id)
- assert expiration = ActivityExpiration.get_by_activity_id(fourth_id)
+ assert Activity.get_by_id(fourth_id)
- estimated_expires_at =
- NaiveDateTime.utc_now()
- |> NaiveDateTime.add(expires_in)
- |> NaiveDateTime.truncate(:second)
-
- # This assert will fail if the test takes longer than a minute. I sure hope it never does:
- assert abs(NaiveDateTime.diff(expiration.scheduled_at, estimated_expires_at, :second)) < 60
-
- assert fourth_response["pleroma"]["expires_at"] ==
- NaiveDateTime.to_iso8601(expiration.scheduled_at)
+ assert_enqueued(
+ worker: Pleroma.Workers.PurgeExpiredActivity,
+ args: %{activity_id: fourth_id},
+ scheduled_at: expires_at
+ )
end
test "it fails to create a status if `expires_in` is less or equal than an hour", %{
conn: conn
} do
- # 1 hour
- expires_in = 60 * 60
+ # 1 minute
+ expires_in = 1 * 60
assert %{"error" => "Expiry date is too soon"} =
conn
@@ -144,8 +141,8 @@ test "it fails to create a status if `expires_in` is less or equal than an hour"
})
|> json_response_and_validate_schema(422)
- # 30 minutes
- expires_in = 30 * 60
+ # 5 minutes
+ expires_in = 5 * 60
assert %{"error" => "Expiry date is too soon"} =
conn
@@ -157,6 +154,17 @@ test "it fails to create a status if `expires_in` is less or equal than an hour"
|> json_response_and_validate_schema(422)
end
+ test "Get MRF reason when posting a status is rejected by one", %{conn: conn} do
+ Config.put([:mrf_keyword, :reject], ["GNO"])
+ Config.put([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.KeywordPolicy])
+
+ assert %{"error" => "[KeywordPolicy] Matches with rejected keyword"} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("api/v1/statuses", %{"status" => "GNO/Linux"})
+ |> json_response_and_validate_schema(422)
+ end
+
test "posting an undefined status with an attachment", %{user: user, conn: conn} do
file = %Plug.Upload{
content_type: "image/jpg",
@@ -283,9 +291,45 @@ test "posting a fake status", %{conn: conn} do
assert real_status == fake_status
end
+ test "fake statuses' preview card is not cached", %{conn: conn} do
+ clear_config([:rich_media, :enabled], true)
+
+ Tesla.Mock.mock(fn
+ %{
+ method: :get,
+ url: "https://example.com/twitter-card"
+ } ->
+ %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/twitter_card.html")}
+
+ env ->
+ apply(HttpRequestMock, :request, [env])
+ end)
+
+ conn1 =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "https://example.com/ogp",
+ "preview" => true
+ })
+
+ conn2 =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "https://example.com/twitter-card",
+ "preview" => true
+ })
+
+ assert %{"card" => %{"title" => "The Rock"}} = json_response_and_validate_schema(conn1, 200)
+
+ assert %{"card" => %{"title" => "Small Island Developing States Photo Submission"}} =
+ json_response_and_validate_schema(conn2, 200)
+ end
+
test "posting a status with OGP link preview", %{conn: conn} do
Tesla.Mock.mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
- Config.put([:rich_media, :enabled], true)
+ clear_config([:rich_media, :enabled], true)
conn =
conn
@@ -760,13 +804,18 @@ test "if user is authenticated", %{local: local, remote: remote} do
test "when you created it" do
%{user: author, conn: conn} = oauth_access(["write:statuses"])
activity = insert(:note_activity, user: author)
+ object = Object.normalize(activity)
- conn =
+ content = object.data["content"]
+ source = object.data["source"]
+
+ result =
conn
|> assign(:user, author)
|> delete("/api/v1/statuses/#{activity.id}")
+ |> json_response_and_validate_schema(200)
- assert %{} = json_response_and_validate_schema(conn, 200)
+ assert match?(%{"content" => ^content, "text" => ^source}, result)
refute Activity.get_by_id(activity.id)
end
@@ -789,7 +838,7 @@ test "when you didn't create it" do
conn = delete(conn, "/api/v1/statuses/#{activity.id}")
- assert %{"error" => _} = json_response_and_validate_schema(conn, 403)
+ assert %{"error" => "Record not found"} == json_response_and_validate_schema(conn, 404)
assert Activity.get_by_id(activity.id) == activity
end
@@ -1092,6 +1141,52 @@ test "max pinned statuses", %{conn: conn, user: user, activity: activity_one} do
|> post("/api/v1/statuses/#{activity_two.id}/pin")
|> json_response_and_validate_schema(400)
end
+
+ test "on pin removes deletion job, on unpin reschedule deletion" do
+ %{conn: conn} = oauth_access(["write:accounts", "write:statuses"])
+ expires_in = 2 * 60 * 60
+
+ expires_at = DateTime.add(DateTime.utc_now(), expires_in)
+
+ assert %{"id" => id} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("api/v1/statuses", %{
+ "status" => "oolong",
+ "expires_in" => expires_in
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert_enqueued(
+ worker: Pleroma.Workers.PurgeExpiredActivity,
+ args: %{activity_id: id},
+ scheduled_at: expires_at
+ )
+
+ assert %{"id" => ^id, "pinned" => true} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses/#{id}/pin")
+ |> json_response_and_validate_schema(200)
+
+ refute_enqueued(
+ worker: Pleroma.Workers.PurgeExpiredActivity,
+ args: %{activity_id: id},
+ scheduled_at: expires_at
+ )
+
+ assert %{"id" => ^id, "pinned" => false} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses/#{id}/unpin")
+ |> json_response_and_validate_schema(200)
+
+ assert_enqueued(
+ worker: Pleroma.Workers.PurgeExpiredActivity,
+ args: %{activity_id: id},
+ scheduled_at: expires_at
+ )
+ end
end
describe "cards" do
@@ -1414,6 +1509,20 @@ test "requires authentication for private posts", %{user: user} do
[%{"id" => id}] = response
assert id == other_user.id
end
+
+ test "returns empty array when :show_reactions is disabled", %{conn: conn, activity: activity} do
+ clear_config([:instance, :show_reactions], false)
+
+ other_user = insert(:user)
+ {:ok, _} = CommonAPI.favorite(other_user, activity.id)
+
+ response =
+ conn
+ |> get("/api/v1/statuses/#{activity.id}/favourited_by")
+ |> json_response_and_validate_schema(:ok)
+
+ assert Enum.empty?(response)
+ end
end
describe "GET /api/v1/statuses/:id/reblogged_by" do
@@ -1561,7 +1670,7 @@ test "favorites paginate correctly" do
# Using the header for pagination works correctly
[next, _] = get_resp_header(result, "link") |> hd() |> String.split(", ")
- [_, max_id] = Regex.run(~r/max_id=(.*)>;/, next)
+ [_, max_id] = Regex.run(~r/max_id=([^&]+)/, next)
assert max_id == third_favorite.id
@@ -1613,19 +1722,17 @@ test "returns the favorites of a user" do
test "expires_at is nil for another user" do
%{conn: conn, user: user} = oauth_access(["read:statuses"])
+ expires_at = DateTime.add(DateTime.utc_now(), 1_000_000)
{:ok, activity} = CommonAPI.post(user, %{status: "foobar", expires_in: 1_000_000})
- expires_at =
- activity.id
- |> ActivityExpiration.get_by_activity_id()
- |> Map.get(:scheduled_at)
- |> NaiveDateTime.to_iso8601()
-
- assert %{"pleroma" => %{"expires_at" => ^expires_at}} =
+ assert %{"pleroma" => %{"expires_at" => a_expires_at}} =
conn
|> get("/api/v1/statuses/#{activity.id}")
|> json_response_and_validate_schema(:ok)
+ {:ok, a_expires_at, 0} = DateTime.from_iso8601(a_expires_at)
+ assert DateTime.diff(expires_at, a_expires_at) == 0
+
%{conn: conn} = oauth_access(["read:statuses"])
assert %{"pleroma" => %{"expires_at" => nil}} =
diff --git a/test/web/mastodon_api/controllers/timeline_controller_test.exs b/test/web/mastodon_api/controllers/timeline_controller_test.exs
index f069390c1..517cabcff 100644
--- a/test/web/mastodon_api/controllers/timeline_controller_test.exs
+++ b/test/web/mastodon_api/controllers/timeline_controller_test.exs
@@ -333,6 +333,46 @@ test "doesn't include DMs from blocked users" do
describe "list" do
setup do: oauth_access(["read:lists"])
+ test "does not contain retoots", %{user: user, conn: conn} do
+ other_user = insert(:user)
+ {:ok, activity_one} = CommonAPI.post(user, %{status: "Marisa is cute."})
+ {:ok, activity_two} = CommonAPI.post(other_user, %{status: "Marisa is stupid."})
+ {:ok, _} = CommonAPI.repeat(activity_one.id, other_user)
+
+ {:ok, list} = Pleroma.List.create("name", user)
+ {:ok, list} = Pleroma.List.follow(list, other_user)
+
+ conn = get(conn, "/api/v1/timelines/list/#{list.id}")
+
+ assert [%{"id" => id}] = json_response_and_validate_schema(conn, :ok)
+
+ assert id == to_string(activity_two.id)
+ end
+
+ test "works with pagination", %{user: user, conn: conn} do
+ other_user = insert(:user)
+ {:ok, list} = Pleroma.List.create("name", user)
+ {:ok, list} = Pleroma.List.follow(list, other_user)
+
+ Enum.each(1..30, fn i ->
+ CommonAPI.post(other_user, %{status: "post number #{i}"})
+ end)
+
+ res =
+ get(conn, "/api/v1/timelines/list/#{list.id}?limit=1")
+ |> json_response_and_validate_schema(:ok)
+
+ assert length(res) == 1
+
+ [first] = res
+
+ res =
+ get(conn, "/api/v1/timelines/list/#{list.id}?max_id=#{first["id"]}&limit=30")
+ |> json_response_and_validate_schema(:ok)
+
+ assert length(res) == 29
+ end
+
test "list timeline", %{user: user, conn: conn} do
other_user = insert(:user)
{:ok, _activity_one} = CommonAPI.post(user, %{status: "Marisa is cute."})
@@ -418,4 +458,95 @@ test "multi-hashtag timeline", %{conn: conn} do
assert [status_none] == json_response_and_validate_schema(all_test, :ok)
end
end
+
+ describe "hashtag timeline handling of :restrict_unauthenticated setting" do
+ setup do
+ user = insert(:user)
+ {:ok, activity1} = CommonAPI.post(user, %{status: "test #tag1"})
+ {:ok, _activity2} = CommonAPI.post(user, %{status: "test #tag1"})
+
+ activity1
+ |> Ecto.Changeset.change(%{local: false})
+ |> Pleroma.Repo.update()
+
+ base_uri = "/api/v1/timelines/tag/tag1"
+ error_response = %{"error" => "authorization required for timeline view"}
+
+ %{base_uri: base_uri, error_response: error_response}
+ end
+
+ defp ensure_authenticated_access(base_uri) do
+ %{conn: auth_conn} = oauth_access(["read:statuses"])
+
+ res_conn = get(auth_conn, "#{base_uri}?local=true")
+ assert length(json_response(res_conn, 200)) == 1
+
+ res_conn = get(auth_conn, "#{base_uri}?local=false")
+ assert length(json_response(res_conn, 200)) == 2
+ end
+
+ test "with default settings on private instances, returns 403 for unauthenticated users", %{
+ conn: conn,
+ base_uri: base_uri,
+ error_response: error_response
+ } do
+ clear_config([:instance, :public], false)
+ clear_config([:restrict_unauthenticated, :timelines])
+
+ for local <- [true, false] do
+ res_conn = get(conn, "#{base_uri}?local=#{local}")
+
+ assert json_response(res_conn, :unauthorized) == error_response
+ end
+
+ ensure_authenticated_access(base_uri)
+ end
+
+ test "with `%{local: true, federated: true}`, returns 403 for unauthenticated users", %{
+ conn: conn,
+ base_uri: base_uri,
+ error_response: error_response
+ } do
+ clear_config([:restrict_unauthenticated, :timelines, :local], true)
+ clear_config([:restrict_unauthenticated, :timelines, :federated], true)
+
+ for local <- [true, false] do
+ res_conn = get(conn, "#{base_uri}?local=#{local}")
+
+ assert json_response(res_conn, :unauthorized) == error_response
+ end
+
+ ensure_authenticated_access(base_uri)
+ end
+
+ test "with `%{local: false, federated: true}`, forbids unauthenticated access to federated timeline",
+ %{conn: conn, base_uri: base_uri, error_response: error_response} do
+ clear_config([:restrict_unauthenticated, :timelines, :local], false)
+ clear_config([:restrict_unauthenticated, :timelines, :federated], true)
+
+ res_conn = get(conn, "#{base_uri}?local=true")
+ assert length(json_response(res_conn, 200)) == 1
+
+ res_conn = get(conn, "#{base_uri}?local=false")
+ assert json_response(res_conn, :unauthorized) == error_response
+
+ ensure_authenticated_access(base_uri)
+ end
+
+ test "with `%{local: true, federated: false}`, forbids unauthenticated access to public timeline" <>
+ "(but not to local public activities which are delivered as part of federated timeline)",
+ %{conn: conn, base_uri: base_uri, error_response: error_response} do
+ clear_config([:restrict_unauthenticated, :timelines, :local], true)
+ clear_config([:restrict_unauthenticated, :timelines, :federated], false)
+
+ res_conn = get(conn, "#{base_uri}?local=true")
+ assert json_response(res_conn, :unauthorized) == error_response
+
+ # Note: local activities get delivered as part of federated timeline
+ res_conn = get(conn, "#{base_uri}?local=false")
+ assert length(json_response(res_conn, 200)) == 2
+
+ ensure_authenticated_access(base_uri)
+ end
+ end
end
diff --git a/test/web/mastodon_api/mastodon_api_test.exs b/test/web/mastodon_api/mastodon_api_test.exs
index a7f9c5205..0c5a38bf6 100644
--- a/test/web/mastodon_api/mastodon_api_test.exs
+++ b/test/web/mastodon_api/mastodon_api_test.exs
@@ -17,8 +17,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPITest do
test "returns error when followed user is deactivated" do
follower = insert(:user)
user = insert(:user, local: true, deactivated: true)
- {:error, error} = MastodonAPI.follow(follower, user)
- assert error == "Could not follow user: #{user.nickname} is deactivated."
+ assert {:error, _error} = MastodonAPI.follow(follower, user)
end
test "following for user" do
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index 044f088a4..9f22f9dcf 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -33,7 +33,8 @@ test "Represent a user account" do
bio:
"valid html. a b c d f '&<>\"",
inserted_at: ~N[2017-08-15 15:47:06.597036],
- emoji: %{"karjalanpiirakka" => "/file.png"}
+ emoji: %{"karjalanpiirakka" => "/file.png"},
+ raw_bio: "valid html. a\nb\nc\nd\nf '&<>\""
})
expected = %{
@@ -74,6 +75,7 @@ test "Represent a user account" do
pleroma: %{
ap_id: user.ap_id,
background_image: "https://example.com/images/asuka_hospital.png",
+ favicon: nil,
confirmation_pending: false,
tags: [],
is_admin: false,
@@ -84,22 +86,42 @@ test "Represent a user account" do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
- skip_thread_containment: false
+ skip_thread_containment: false,
+ accepts_chat_messages: nil
}
}
- assert expected == AccountView.render("show.json", %{user: user})
+ assert expected == AccountView.render("show.json", %{user: user, skip_visibility_check: true})
+ end
+
+ describe "favicon" do
+ setup do
+ [user: insert(:user)]
+ end
+
+ test "is parsed when :instance_favicons is enabled", %{user: user} do
+ clear_config([:instances_favicons, :enabled], true)
+
+ assert %{
+ pleroma: %{
+ favicon:
+ "https://shitposter.club/plugins/Qvitter/img/gnusocial-favicons/favicon-16x16.png"
+ }
+ } = AccountView.render("show.json", %{user: user, skip_visibility_check: true})
+ end
+
+ test "is nil when :instances_favicons is disabled", %{user: user} do
+ assert %{pleroma: %{favicon: nil}} =
+ AccountView.render("show.json", %{user: user, skip_visibility_check: true})
+ end
end
test "Represent the user account for the account owner" do
user = insert(:user)
notification_settings = %{
- followers: true,
- follows: true,
- non_followers: true,
- non_follows: true,
- privacy_option: false
+ block_from_strangers: false,
+ hide_notification_contents: false
}
privacy = user.default_scope
@@ -151,6 +173,7 @@ test "Represent a Service(bot) account" do
pleroma: %{
ap_id: user.ap_id,
background_image: nil,
+ favicon: nil,
confirmation_pending: false,
tags: [],
is_admin: false,
@@ -161,11 +184,12 @@ test "Represent a Service(bot) account" do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
- skip_thread_containment: false
+ skip_thread_containment: false,
+ accepts_chat_messages: nil
}
}
- assert expected == AccountView.render("show.json", %{user: user})
+ assert expected == AccountView.render("show.json", %{user: user, skip_visibility_check: true})
end
test "Represent a Funkwhale channel" do
@@ -174,7 +198,9 @@ test "Represent a Funkwhale channel" do
"https://channels.tests.funkwhale.audio/federation/actors/compositions"
)
- assert represented = AccountView.render("show.json", %{user: user})
+ assert represented =
+ AccountView.render("show.json", %{user: user, skip_visibility_check: true})
+
assert represented.acct == "compositions@channels.tests.funkwhale.audio"
assert represented.url == "https://channels.tests.funkwhale.audio/channels/compositions"
end
@@ -199,6 +225,23 @@ test "Represent a smaller mention" do
assert expected == AccountView.render("mention.json", %{user: user})
end
+ test "demands :for or :skip_visibility_check option for account rendering" do
+ clear_config([:restrict_unauthenticated, :profiles, :local], false)
+
+ user = insert(:user)
+ user_id = user.id
+
+ assert %{id: ^user_id} = AccountView.render("show.json", %{user: user, for: nil})
+ assert %{id: ^user_id} = AccountView.render("show.json", %{user: user, for: user})
+
+ assert %{id: ^user_id} =
+ AccountView.render("show.json", %{user: user, skip_visibility_check: true})
+
+ assert_raise RuntimeError, ~r/:skip_visibility_check or :for option is required/, fn ->
+ AccountView.render("show.json", %{user: user})
+ end
+ end
+
describe "relationship" do
defp test_relationship_rendering(user, other_user, expected_result) do
opts = %{user: user, target: other_user, relationships: nil}
@@ -312,7 +355,7 @@ test "returns the settings store if the requesting user is the represented user
assert result.pleroma.settings_store == %{:fe => "test"}
- result = AccountView.render("show.json", %{user: user, with_pleroma_settings: true})
+ result = AccountView.render("show.json", %{user: user, for: nil, with_pleroma_settings: true})
assert result.pleroma[:settings_store] == nil
result = AccountView.render("show.json", %{user: user, for: user})
@@ -321,13 +364,13 @@ test "returns the settings store if the requesting user is the represented user
test "doesn't sanitize display names" do
user = insert(:user, name: "")
- result = AccountView.render("show.json", %{user: user})
+ result = AccountView.render("show.json", %{user: user, skip_visibility_check: true})
assert result.display_name == ""
end
test "never display nil user follow counts" do
user = insert(:user, following_count: 0, follower_count: 0)
- result = AccountView.render("show.json", %{user: user})
+ result = AccountView.render("show.json", %{user: user, skip_visibility_check: true})
assert result.following_count == 0
assert result.followers_count == 0
@@ -351,7 +394,7 @@ test "shows when follows/followers stats are hidden and sets follow/follower cou
followers_count: 0,
following_count: 0,
pleroma: %{hide_follows_count: true, hide_followers_count: true}
- } = AccountView.render("show.json", %{user: user})
+ } = AccountView.render("show.json", %{user: user, skip_visibility_check: true})
end
test "shows when follows/followers are hidden" do
@@ -364,13 +407,16 @@ test "shows when follows/followers are hidden" do
followers_count: 1,
following_count: 1,
pleroma: %{hide_follows: true, hide_followers: true}
- } = AccountView.render("show.json", %{user: user})
+ } = AccountView.render("show.json", %{user: user, skip_visibility_check: true})
end
test "shows actual follower/following count to the account owner" do
user = insert(:user, hide_followers: true, hide_follows: true)
other_user = insert(:user)
{:ok, user, other_user, _activity} = CommonAPI.follow(user, other_user)
+
+ assert User.following?(user, other_user)
+ assert Pleroma.FollowingRelationship.follower_count(other_user) == 1
{:ok, _other_user, user, _activity} = CommonAPI.follow(other_user, user)
assert %{
@@ -504,7 +550,7 @@ test "uses mediaproxy urls when it's enabled" do
emoji: %{"joker_smile" => "https://evil.website/society.png"}
)
- AccountView.render("show.json", %{user: user})
+ AccountView.render("show.json", %{user: user, skip_visibility_check: true})
|> Enum.all?(fn
{key, url} when key in [:avatar, :avatar_static, :header, :header_static] ->
String.starts_with?(url, Pleroma.Web.base_url())
diff --git a/test/web/mastodon_api/views/conversation_view_test.exs b/test/web/mastodon_api/views/conversation_view_test.exs
index 6f84366f8..2e8203c9b 100644
--- a/test/web/mastodon_api/views/conversation_view_test.exs
+++ b/test/web/mastodon_api/views/conversation_view_test.exs
@@ -15,8 +15,17 @@ test "represents a Mastodon Conversation entity" do
user = insert(:user)
other_user = insert(:user)
+ {:ok, parent} = CommonAPI.post(user, %{status: "parent"})
+
{:ok, activity} =
- CommonAPI.post(user, %{status: "hey @#{other_user.nickname}", visibility: "direct"})
+ CommonAPI.post(user, %{
+ status: "hey @#{other_user.nickname}",
+ visibility: "direct",
+ in_reply_to_id: parent.id
+ })
+
+ {:ok, _reply_activity} =
+ CommonAPI.post(user, %{status: "hu", visibility: "public", in_reply_to_id: parent.id})
[participation] = Participation.for_user_with_last_activity_id(user)
diff --git a/test/web/mastodon_api/views/notification_view_test.exs b/test/web/mastodon_api/views/notification_view_test.exs
index 9c399b2df..2f6a808f1 100644
--- a/test/web/mastodon_api/views/notification_view_test.exs
+++ b/test/web/mastodon_api/views/notification_view_test.exs
@@ -49,7 +49,7 @@ test "ChatMessage notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "pleroma:chat_mention",
account: AccountView.render("show.json", %{user: user, for: recipient}),
chat_message: MessageReferenceView.render("show.json", %{chat_message_reference: cm_ref}),
@@ -68,7 +68,7 @@ test "Mention notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "mention",
account:
AccountView.render("show.json", %{
@@ -92,7 +92,7 @@ test "Favourite notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "favourite",
account: AccountView.render("show.json", %{user: another_user, for: user}),
status: StatusView.render("show.json", %{activity: create_activity, for: user}),
@@ -112,7 +112,7 @@ test "Reblog notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "reblog",
account: AccountView.render("show.json", %{user: another_user, for: user}),
status: StatusView.render("show.json", %{activity: reblog_activity, for: user}),
@@ -130,7 +130,7 @@ test "Follow notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "follow",
account: AccountView.render("show.json", %{user: follower, for: followed}),
created_at: Utils.to_masto_date(notification.inserted_at)
@@ -171,7 +171,7 @@ test "Move notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "move",
account: AccountView.render("show.json", %{user: old_user, for: follower}),
target: AccountView.render("show.json", %{user: new_user, for: follower}),
@@ -196,7 +196,7 @@ test "EmojiReact notification" do
expected = %{
id: to_string(notification.id),
- pleroma: %{is_seen: false},
+ pleroma: %{is_seen: false, is_muted: false},
type: "pleroma:emoji_reaction",
emoji: "☕",
account: AccountView.render("show.json", %{user: other_user, for: user}),
@@ -206,4 +206,26 @@ test "EmojiReact notification" do
test_notifications_rendering([notification], user, [expected])
end
+
+ test "muted notification" do
+ user = insert(:user)
+ another_user = insert(:user)
+
+ {:ok, _} = Pleroma.UserRelationship.create_mute(user, another_user)
+ {:ok, create_activity} = CommonAPI.post(user, %{status: "hey"})
+ {:ok, favorite_activity} = CommonAPI.favorite(another_user, create_activity.id)
+ {:ok, [notification]} = Notification.create_notifications(favorite_activity)
+ create_activity = Activity.get_by_id(create_activity.id)
+
+ expected = %{
+ id: to_string(notification.id),
+ pleroma: %{is_seen: true, is_muted: true},
+ type: "favourite",
+ account: AccountView.render("show.json", %{user: another_user, for: user}),
+ status: StatusView.render("show.json", %{activity: create_activity, for: user}),
+ created_at: Utils.to_masto_date(notification.inserted_at)
+ }
+
+ test_notifications_rendering([notification], user, [expected])
+ end
end
diff --git a/test/web/mastodon_api/views/poll_view_test.exs b/test/web/mastodon_api/views/poll_view_test.exs
index 76672f36c..b7e2f17ef 100644
--- a/test/web/mastodon_api/views/poll_view_test.exs
+++ b/test/web/mastodon_api/views/poll_view_test.exs
@@ -135,4 +135,33 @@ test "does not crash on polls with no end date" do
assert result[:expires_at] == nil
assert result[:expired] == false
end
+
+ test "doesn't strips HTML tags" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "What's with the smug face?",
+ poll: %{
+ options: [
+ "",
+ "",
+ "",
+ ""
+ ],
+ expires_in: 20
+ }
+ })
+
+ object = Object.normalize(activity)
+
+ assert %{
+ options: [
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0}
+ ]
+ } = PollView.render("show.json", %{object: object})
+ end
end
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index 5cbadf0fc..70d829979 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -56,6 +56,23 @@ test "has an emoji reaction list" do
]
end
+ test "works correctly with badly formatted emojis" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "yo"})
+
+ activity
+ |> Object.normalize(false)
+ |> Object.update_data(%{"reactions" => %{"☕" => [user.ap_id], "x" => 1}})
+
+ activity = Activity.get_by_id(activity.id)
+
+ status = StatusView.render("show.json", activity: activity, for: user)
+
+ assert status[:pleroma][:emoji_reactions] == [
+ %{name: "☕", count: 1, me: true}
+ ]
+ end
+
test "loads and returns the direct conversation id when given the `with_direct_conversation_id` option" do
user = insert(:user)
@@ -177,12 +194,13 @@ test "a note activity" do
id: to_string(note.id),
uri: object_data["id"],
url: Pleroma.Web.Router.Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, note),
- account: AccountView.render("show.json", %{user: user}),
+ account: AccountView.render("show.json", %{user: user, skip_visibility_check: true}),
in_reply_to_id: nil,
in_reply_to_account_id: nil,
card: nil,
reblog: nil,
content: HTML.filter_tags(object_data["content"]),
+ text: nil,
created_at: created_at,
reblogs_count: 0,
replies_count: 0,
@@ -226,7 +244,8 @@ test "a note activity" do
expires_at: nil,
direct_conversation_id: nil,
thread_muted: false,
- emoji_reactions: []
+ emoji_reactions: [],
+ parent_visible: false
}
}
@@ -498,6 +517,12 @@ test "a Mobilizon event" do
represented = StatusView.render("show.json", %{for: user, activity: activity})
assert represented[:id] == to_string(activity.id)
+
+ assert represented[:url] ==
+ "https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39"
+
+ assert represented[:content] ==
+ "
You can view this event from other instances if they are subscribed to mobilizon.org, and soon directly from Mastodon and Pleroma. It is possible that you may see some comments from other instances, including Mastodon ones, just below.
With a Mobilizon account on an instance, you may participate at events from other instances and add comments on events.
Of course, it's still a work in progress: if reports made from an instance on events and comments can be federated, you can't block people right now, and moderators actions are rather limited, but this will definitely get fixed over time until first stable version next year.
Anyway, if you want to come up with some feedback, head over to our forum or - if you feel you have technical skills and are familiar with it - on our Gitlab repository.
Also, to people that want to set Mobilizon themselves even though we really don't advise to do that for now, we have a little documentation but it's quite the early days and you'll probably need some help. No worries, you can chat with us on our Forum or though our Matrix channel.
Check our website for more informations and follow us on Twitter or Mastodon.