FIX: Service worker push notifications when cache disabled (#25610)

This commit is contained in:
David Taylor 2024-02-08 11:55:32 +00:00 committed by GitHub
parent ee08a8c52b
commit 234795c70e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,8 +22,6 @@ workbox.setConfig({
});
var authUrls = ["auth", "session/sso_login", "session/sso", "srv/status"].map(path => `<%= Discourse.base_path %>/${path}`);
var chatRegex = /\/chat\/channel\/(\d+)\//;
var inlineReplyIcon = "<%= UrlHelper.absolute("/images/push-notifications/inline_reply.png") %>";
const oldCacheNames = [
"discourse-1", "external-1"
@ -147,6 +145,9 @@ workbox.routing.registerRoute(
);
<% end %>
var chatRegex = /\/chat\/channel\/(\d+)\//;
var inlineReplyIcon = "<%= UrlHelper.absolute("/images/push-notifications/inline_reply.png") %>";
function showNotification(title, body, icon, badge, tag, baseUrl, url) {
var notificationOptions = {
body: body,