Merge commit 'c6facd27ed191177afb003640b8ee7d0742c7f63' into glitch-soc/merge-upstream
This commit is contained in:
commit
44394878a4
227 files changed
+2723
-1926
No files matched your search
@@ -16,7 +16,7 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||
@relationships = StatusRelationshipsPresenter.new(target_statuses_from_notifications, current_user&.account_id)
|
||||
end
|
||||
|
||||
render json: @notifications, each_serializer: REST::NotificationSerializer, relationships: @relationships
|
||||
render json: @notifications, each_serializer: REST::NotificationSerializer, relationships: @relationships, supported_notification_types: params[:supported_types]
|
||||
end
|
||||
|
||||
def unread_count
|
||||
@@ -29,7 +29,7 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||
|
||||
def show
|
||||
@notification = current_account.notifications.without_suspended.find(params[:id])
|
||||
render json: @notification, serializer: REST::NotificationSerializer
|
||||
render json: @notification, serializer: REST::NotificationSerializer, supported_notification_types: params[:supported_types]
|
||||
end
|
||||
|
||||
def clear
|
||||
@@ -98,6 +98,8 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||
end
|
||||
|
||||
def pagination_params(core_params)
|
||||
params.slice(:limit, :account_id, :types, :exclude_types, :include_filtered).permit(:limit, :account_id, :include_filtered, types: [], exclude_types: []).merge(core_params)
|
||||
params.slice(:limit, :account_id, :types, :exclude_types, :include_filtered, :supported_types)
|
||||
.permit(:limit, :account_id, :include_filtered, types: [], exclude_types: [], supported_types: [])
|
||||
.merge(core_params)
|
||||
end
|
||||
end
|
||||
@@ -33,7 +33,7 @@ class Api::V2::NotificationsController < Api::BaseController
|
||||
'app.notification_grouping.expand_accounts_param' => expand_accounts_param
|
||||
)
|
||||
|
||||
render json: @presenter, serializer: REST::DedupNotificationGroupSerializer, relationships: @relationships, expand_accounts: expand_accounts_param
|
||||
render json: @presenter, serializer: REST::DedupNotificationGroupSerializer, relationships: @relationships, expand_accounts: expand_accounts_param, supported_notification_types: params[:supported_types]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@ class Api::V2::NotificationsController < Api::BaseController
|
||||
def show
|
||||
@notification = current_account.notifications.without_suspended.by_group_key(params[:group_key]).take!
|
||||
presenter = GroupedNotificationsPresenter.new(NotificationGroup.from_notifications([@notification]))
|
||||
render json: presenter, serializer: REST::DedupNotificationGroupSerializer
|
||||
render json: presenter, serializer: REST::DedupNotificationGroupSerializer, supported_notification_types: params[:supported_types]
|
||||
end
|
||||
|
||||
def clear
|
||||
@@ -138,7 +138,9 @@ class Api::V2::NotificationsController < Api::BaseController
|
||||
end
|
||||
|
||||
def pagination_params(core_params)
|
||||
params.slice(:limit, :include_filtered, :types, :exclude_types, :grouped_types).permit(:limit, :include_filtered, types: [], exclude_types: [], grouped_types: []).merge(core_params)
|
||||
params.slice(:limit, :include_filtered, :types, :exclude_types, :grouped_types, :supported_types)
|
||||
.permit(:limit, :include_filtered, types: [], exclude_types: [], grouped_types: [], supported_types: [])
|
||||
.merge(core_params)
|
||||
end
|
||||
|
||||
def expand_accounts_param
|
||||
|
||||
Reference in new issue
Block a user