logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 428e038c58babc43655714be5b29540bb38486ae
parent 0dfcc24d30b3b33980ae7780b5c08bd28317399c
Author: nicole mikołajczyk <me@mkljczk.pl>
Date:   Sat, 29 Nov 2025 17:21:44 +0100

Merge branch 'notification-view-deduplicate' into 'develop'

remove duplicated code from notificationview

See merge request pleroma/pleroma!4356

Diffstat:

Achangelog.d/notification-view-deduplicate.skip1+
Mlib/pleroma/web/mastodon_api/views/notification_view.ex16++--------------
2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/changelog.d/notification-view-deduplicate.skip b/changelog.d/notification-view-deduplicate.skip @@ -0,0 +1 @@ +remove duplicated code from notificationview diff --git a/lib/pleroma/web/mastodon_api/views/notification_view.ex b/lib/pleroma/web/mastodon_api/views/notification_view.ex @@ -106,27 +106,15 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do } case notification.type do - "mention" -> + type when type in ["mention", "status", "poll"] -> put_status(response, activity, reading_user, status_render_opts) - "status" -> - put_status(response, activity, reading_user, status_render_opts) - - "favourite" -> - put_status(response, parent_activity_fn.(), reading_user, status_render_opts) - - "reblog" -> - put_status(response, parent_activity_fn.(), reading_user, status_render_opts) - - "update" -> + type when type in ["favourite", "reblog", "update"] -> put_status(response, parent_activity_fn.(), reading_user, status_render_opts) "move" -> put_target(response, activity, reading_user, %{}) - "poll" -> - put_status(response, activity, reading_user, status_render_opts) - "pleroma:emoji_reaction" -> response |> put_status(parent_activity_fn.(), reading_user, status_render_opts)