Remove notificationCase function

This commit is contained in:
Nicola Benaglia 2025-05-23 15:02:16 +02:00
parent e0de100d01
commit a89de90ee0
2 changed files with 0 additions and 41 deletions

View File

@ -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;

View File

@ -3209,9 +3209,6 @@ function setupMessageListener() {
case 'removeAdmin':
removeAdminCase(request, event);
break;
case 'notification':
notificationCase(request, event);
break;
case 'addTimestampEnterChat':
addTimestampEnterChatCase(request, event);
break;