Merge pull request 'fix-sonarqube-sw' (#3537) from fix-sonarqube-sw into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3537
This commit is contained in:
HJ 2026-08-05 16:44:54 +00:00
commit 8d3d7ab7ae
2 changed files with 7 additions and 1 deletions

View file

@ -7,7 +7,9 @@ export const getCommitHash = () => {
} else { } else {
try { try {
return childProcess return childProcess
.execSync('git rev-parse --short HEAD') .execSync(
'PATH=/usr/bin:/bin:/usr/local/bin:/sbin:/usr/sbin git rev-parse --short HEAD',
)
.toString() .toString()
.trim() .trim()
} catch (e) { } catch (e) {

View file

@ -198,6 +198,10 @@ self.addEventListener('push', async (event) => {
self.addEventListener('message', async (event) => { self.addEventListener('message', async (event) => {
await setSettings() await setSettings()
const { type, content } = event.data const { type, content } = event.data
if (self.location.origin !== event.origin) {
console.error('SW Message with strange origin received', event)
return
}
if (type === 'desktopNotification') { if (type === 'desktopNotification') {
const { title, ...rest } = content const { title, ...rest } = content