remove duplicated code from notificationview
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
d1d7dd1827
commit
c3c57ef6c4
2 changed files with 3 additions and 14 deletions
1
changelog.d/notification-view-deduplicate.skip
Normal file
1
changelog.d/notification-view-deduplicate.skip
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
remove duplicated code from notificationview
|
||||||
|
|
@ -106,27 +106,15 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do
|
||||||
}
|
}
|
||||||
|
|
||||||
case notification.type do
|
case notification.type do
|
||||||
"mention" ->
|
type when type in ["mention", "status", "poll"] ->
|
||||||
put_status(response, activity, reading_user, status_render_opts)
|
put_status(response, activity, reading_user, status_render_opts)
|
||||||
|
|
||||||
"status" ->
|
type when type in ["favourite", "reblog", "update"] ->
|
||||||
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" ->
|
|
||||||
put_status(response, parent_activity_fn.(), reading_user, status_render_opts)
|
put_status(response, parent_activity_fn.(), reading_user, status_render_opts)
|
||||||
|
|
||||||
"move" ->
|
"move" ->
|
||||||
put_target(response, activity, reading_user, %{})
|
put_target(response, activity, reading_user, %{})
|
||||||
|
|
||||||
"poll" ->
|
|
||||||
put_status(response, activity, reading_user, status_render_opts)
|
|
||||||
|
|
||||||
"pleroma:emoji_reaction" ->
|
"pleroma:emoji_reaction" ->
|
||||||
response
|
response
|
||||||
|> put_status(parent_activity_fn.(), reading_user, status_render_opts)
|
|> put_status(parent_activity_fn.(), reading_user, status_render_opts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue