Merge branch 'develop' into remove-precompiled-js

This commit is contained in:
FloatingGhost 2022-06-21 17:23:52 +01:00
commit 1d595813a1
2 changed files with 67 additions and 0 deletions

View file

@ -4,6 +4,29 @@ 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]
## 2.5.2
### Added
- Allow posting and recieving of misskey markdown (requires text/x.misskeymarkdown in `allowed_post_formats`)
### Changed
- Set frontend URLs to akkoma-maintained ones
### Fixed
- Updated `no_empty` MRF to not error when recieving misskey markdown
## 2.5.1
### Added
- Elasticsearch Search provider support
- Enabled custom emoji reactions to posts via `/api/v1/pleroma/statuses/:id/reactions/:shortcode:`
- Added continuous integration builds for x86 glibc and musl
### Fixed
- Enabled support for non-standard AP entities, such as those used by bookwyrm
## 2.5.0 - 10/06/2022
### Changed

View file

@ -12,6 +12,8 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.ActivityPub.Builder
alias Pleroma.Web.ActivityPub.Pipeline
alias Pleroma.Web.AdminAPI.Report
alias Pleroma.Web.AdminAPI.ReportView
alias Pleroma.Web.CommonAPI
@ -19,6 +21,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.NotificationView
alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.Web.MediaProxy
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
import Pleroma.Factory
@ -224,6 +227,47 @@ test "EmojiReact notification with custom emoji" do
test_notifications_rendering([notification], user, [expected])
end
test "EmojiReact notification with remote custom emoji" do
proxyBaseUrl = "https://cache.pleroma.social"
clear_config([:media_proxy, :base_url], proxyBaseUrl)
for testProxy <- [true, false] do
clear_config([:media_proxy, :enabled], testProxy)
user = insert(:user)
other_user = insert(:user, local: false)
{:ok, activity} = CommonAPI.post(user, %{status: "#morb"})
{:ok, emoji_react, _} = Builder.emoji_react(other_user, Object.normalize(activity, fetch: false), ":100a:")
remoteUrl = "http://evil.website/emoji/100a.png"
[tag] = emoji_react["tag"]
tag = put_in(tag["id"], remoteUrl)
tag = put_in(tag["icon"]["url"], remoteUrl)
emoji_react = put_in(emoji_react["tag"], [tag])
{:ok, _activity, _} = Pipeline.common_pipeline(emoji_react, local: false)
activity = Repo.get(Activity, activity.id)
[notification] = Notification.for_user(user)
assert notification
expected = %{
id: to_string(notification.id),
pleroma: %{is_seen: false, is_muted: false},
type: "pleroma:emoji_reaction",
emoji: ":100a:",
emoji_url: (if testProxy, do: MediaProxy.encode_url(remoteUrl), else: remoteUrl),
account: AccountView.render("show.json", %{user: other_user, for: user}),
status: StatusView.render("show.json", %{activity: activity, for: user}),
created_at: Utils.to_masto_date(notification.inserted_at)
}
test_notifications_rendering([notification], user, [expected])
end
end
test "Poll notification" do
user = insert(:user)
activity = insert(:question_activity, user: user)