diff --git a/app/models/inbox.rb b/app/models/inbox.rb index f0ee2cfb..fbc631d6 100644 --- a/app/models/inbox.rb +++ b/app/models/inbox.rb @@ -38,6 +38,7 @@ class Inbox < ApplicationRecord question.user.profile.safe_name end ), + icon: question.author_is_anonymous ? "/icons/maskable_icon_x128.png" : question.user.profile_picture.url(:small), body: question.content } end diff --git a/public/service_worker.js b/public/service_worker.js index 08e1f717..383b3d0a 100644 --- a/public/service_worker.js +++ b/public/service_worker.js @@ -6,7 +6,7 @@ self.addEventListener('push', function (event) { event.waitUntil(self.registration.showNotification(notification.title, { body: notification.body, tag: notification.type, - icon: "/icons/maskable_icon_x128.png" + icon: notification.icon, })); } else { console.error("Push event received, but it didn't contain any data.", event);