mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-07 08:56:58 +00:00
Remove notificationCase function
This commit is contained in:
parent
e0de100d01
commit
a89de90ee0
@ -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) {
|
export async function addTimestampEnterChatCase(request, event) {
|
||||||
try {
|
try {
|
||||||
const { groupId, timestamp } = request.payload;
|
const { groupId, timestamp } = request.payload;
|
||||||
|
@ -3209,9 +3209,6 @@ function setupMessageListener() {
|
|||||||
case 'removeAdmin':
|
case 'removeAdmin':
|
||||||
removeAdminCase(request, event);
|
removeAdminCase(request, event);
|
||||||
break;
|
break;
|
||||||
case 'notification':
|
|
||||||
notificationCase(request, event);
|
|
||||||
break;
|
|
||||||
case 'addTimestampEnterChat':
|
case 'addTimestampEnterChat':
|
||||||
addTimestampEnterChatCase(request, event);
|
addTimestampEnterChatCase(request, event);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user