Skip to content

Commit

Permalink
Fallback Notification
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Slepak <contact@taoeffect.com>
  • Loading branch information
corrideat and taoeffect committed Dec 19, 2024
1 parent 3c62ff5 commit 846aac4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/controller/serviceworkers/push.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { L } from '@common/common.js'
import { PUBSUB_INSTANCE } from '@controller/instance-keys.js'
import { makeNotification } from '@model/notifications/nativeNotification.js'
import sbp from '@sbp/sbp'
Expand Down Expand Up @@ -135,8 +136,9 @@ self.addEventListener('push', function (event) {
}).catch((e) => {
console.error('Error processing push event', e)
if (data.contractType === 'gi.contracts/chatroom') {
// TODO: Text for this notification
return makeNotification({ title: '@@@err', body: e.message })
return makeNotification({ title: L('Chatroom activity'), body: L('New chatroom message. An iOS bug prevents us from saying what it is.') })
} else if (data.contractType === 'gi.contracts/group') {
return makeNotification({ title: L('Group activity'), body: L('New group activity. An iOS bug prevents us from saying what it is.') })
}
}))
}
Expand Down

0 comments on commit 846aac4

Please sign in to comment.