Skip to content

Commit

Permalink
Notification template updates
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Dec 17, 2024
1 parent ad7835c commit 5839cfa
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 15 deletions.
4 changes: 2 additions & 2 deletions frontend/controller/serviceworkers/sw-primary.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ sbp('okTurtles.events/on', NEW_CHATROOM_UNREAD_POSITION, ({ chatRoomID, messageH
sbp('okTurtles.events/on', NOTIFICATION_EMITTED, (notification) => {
makeNotification({
// icon: undefined, // TODO
title: 'TBD', // TODO
body: notification.body,
title: notification.title,
body: notification.plaintextBody,
groupID: notification.groupID,
path: notification.linkTo
}).catch(e => {
Expand Down
5 changes: 3 additions & 2 deletions frontend/model/notifications/nativeNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ export async function requestNotificationPermission (): Promise<null | string> {
}
}

export function makeNotification ({ title, body, icon, path, groupID }: {
// eslint-disable-next-line require-await
export async function makeNotification ({ title, body, icon, path, groupID }: {
title: string, body: string, icon?: string, path?: string, groupID?: string
}): void | Promise<void> {
}): Promise<void> {
if (typeof Notification !== 'function') return
// If not running on a SW
if (typeof WorkerGlobalScope !== 'function') {
Expand Down
Loading

0 comments on commit 5839cfa

Please sign in to comment.