diff --git a/src/background-cases.ts b/src/background-cases.ts index f10dbdd..56697a7 100644 --- a/src/background-cases.ts +++ b/src/background-cases.ts @@ -900,44 +900,6 @@ export async function removeAdminCase(request, event) { } } -export async function notificationCase(request, event) { - try { - const notificationId = 'chat_notification_' + Date.now(); // Create a unique ID - - // chrome.notifications.create(notificationId, { - // type: "basic", - // iconUrl: "qort.png", // Add an appropriate icon for chat notifications - // title: "New Group Message!", - // message: "You have received a new message from one of your groups", - // priority: 2, // Use the maximum priority to ensure it's - // }); - // Set a timeout to clear the notification after 'timeout' milliseconds - // setTimeout(() => { - // chrome.notifications.clear(notificationId); - // }, 3000); - - // event.source.postMessage( - // { - // requestId: request.requestId, - // action: "notification", - // payload: true, - // type: "backgroundMessageResponse", - // }, - // event.origin - // ); - } catch (error) { - event.source.postMessage( - { - requestId: request.requestId, - action: 'notification', - error: 'Error displaying notifaction', - type: 'backgroundMessageResponse', - }, - event.origin - ); - } -} - export async function addTimestampEnterChatCase(request, event) { try { const { groupId, timestamp } = request.payload; diff --git a/src/background.ts b/src/background.ts index 2d81e2e..cbc96b3 100644 --- a/src/background.ts +++ b/src/background.ts @@ -3209,9 +3209,6 @@ function setupMessageListener() { case 'removeAdmin': removeAdminCase(request, event); break; - case 'notification': - notificationCase(request, event); - break; case 'addTimestampEnterChat': addTimestampEnterChatCase(request, event); break;