about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-19 12:00:05 +0200
committerGitHub <noreply@github.com>2017-07-19 12:00:05 +0200
commitc2c93f8cd64704c715f5fb843e2b532779a1ca0f (patch)
treebf5fac17188d234a50e55effd685488733274714 /app
parent9fc082ea81932b2ee5c7d887f9c31d26d913df7c (diff)
Fix deprecation warning for non-pipeline assets (#4267)
Diffstat (limited to 'app')
-rw-r--r--app/helpers/routing_helper.rb4
-rw-r--r--app/models/web/push_subscription.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/routing_helper.rb b/app/helpers/routing_helper.rb
index 9650ee286..8126176ba 100644
--- a/app/helpers/routing_helper.rb
+++ b/app/helpers/routing_helper.rb
@@ -11,7 +11,7 @@ module RoutingHelper
     end
   end
 
-  def full_asset_url(source)
-    Rails.configuration.x.use_s3 ? source : URI.join(root_url, ActionController::Base.helpers.asset_url(source)).to_s
+  def full_asset_url(source, options = {})
+    Rails.configuration.x.use_s3 ? source : URI.join(root_url, ActionController::Base.helpers.asset_url(source, options)).to_s
   end
 end
diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb
index baf6a1ece..dffdbbd05 100644
--- a/app/models/web/push_subscription.rb
+++ b/app/models/web/push_subscription.rb
@@ -45,7 +45,7 @@ class Web::PushSubscription < ApplicationRecord
         title: title,
         dir: dir,
         image: image,
-        badge: full_asset_url('badge.png'),
+        badge: full_asset_url('badge.png', skip_pipeline: true),
         tag: notification.id,
         timestamp: notification.created_at,
         icon: notification.from_account.avatar_static_url,
@@ -115,7 +115,7 @@ class Web::PushSubscription < ApplicationRecord
       when :mention then [
         {
           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',
           method: 'POST',
           action: "/api/v1/statuses/#{notification.target_status.id}/favourite",
@@ -156,8 +156,8 @@ class Web::PushSubscription < ApplicationRecord
     Webpush.payload_send(
       message: JSON.generate(
         title: translate('push_notifications.subscribed.title'),
-        icon: full_asset_url('android-chrome-192x192.png'),
-        badge: full_asset_url('badge.png'),
+        icon: full_asset_url('android-chrome-192x192.png', skip_pipeline: true),
+        badge: full_asset_url('badge.png', skip_pipeline: true),
         data: {
           content: translate('push_notifications.subscribed.body'),
           actions: [],