Fix deprecation warning for non-pipeline assets (#4267)
This commit is contained in:
parent
9fc082ea81
commit
c2c93f8cd6
@ -11,7 +11,7 @@ module RoutingHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_asset_url(source)
|
def full_asset_url(source, options = {})
|
||||||
Rails.configuration.x.use_s3 ? source : URI.join(root_url, ActionController::Base.helpers.asset_url(source)).to_s
|
Rails.configuration.x.use_s3 ? source : URI.join(root_url, ActionController::Base.helpers.asset_url(source, options)).to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ class Web::PushSubscription < ApplicationRecord
|
|||||||
title: title,
|
title: title,
|
||||||
dir: dir,
|
dir: dir,
|
||||||
image: image,
|
image: image,
|
||||||
badge: full_asset_url('badge.png'),
|
badge: full_asset_url('badge.png', skip_pipeline: true),
|
||||||
tag: notification.id,
|
tag: notification.id,
|
||||||
timestamp: notification.created_at,
|
timestamp: notification.created_at,
|
||||||
icon: notification.from_account.avatar_static_url,
|
icon: notification.from_account.avatar_static_url,
|
||||||
@ -115,7 +115,7 @@ class Web::PushSubscription < ApplicationRecord
|
|||||||
when :mention then [
|
when :mention then [
|
||||||
{
|
{
|
||||||
title: translate('push_notifications.mention.action_favourite'),
|
title: translate('push_notifications.mention.action_favourite'),
|
||||||
icon: full_asset_url('emoji/2764.png'),
|
icon: full_asset_url('emoji/2764.png', skip_pipeline: true),
|
||||||
todo: 'request',
|
todo: 'request',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
action: "/api/v1/statuses/#{notification.target_status.id}/favourite",
|
action: "/api/v1/statuses/#{notification.target_status.id}/favourite",
|
||||||
@ -156,8 +156,8 @@ class Web::PushSubscription < ApplicationRecord
|
|||||||
Webpush.payload_send(
|
Webpush.payload_send(
|
||||||
message: JSON.generate(
|
message: JSON.generate(
|
||||||
title: translate('push_notifications.subscribed.title'),
|
title: translate('push_notifications.subscribed.title'),
|
||||||
icon: full_asset_url('android-chrome-192x192.png'),
|
icon: full_asset_url('android-chrome-192x192.png', skip_pipeline: true),
|
||||||
badge: full_asset_url('badge.png'),
|
badge: full_asset_url('badge.png', skip_pipeline: true),
|
||||||
data: {
|
data: {
|
||||||
content: translate('push_notifications.subscribed.body'),
|
content: translate('push_notifications.subscribed.body'),
|
||||||
actions: [],
|
actions: [],
|
||||||
|
Loading…
Reference in New Issue
Block a user