Use author avatar on notification
This commit is contained in:
parent
a67c26d985
commit
2d6f539dfd
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue