fix(site): 修复解忧站点图标
This commit is contained in:
@@ -96,10 +96,13 @@ export function useDesktopNotification(scope: 'user' | 'admin') {
|
||||
|
||||
if (shouldNotify(event.conversation_id, currentConversationId)) {
|
||||
try {
|
||||
const notificationIcon =
|
||||
document.querySelector<HTMLLinkElement>("link[rel='icon']")?.href ||
|
||||
'/apple-touch-icon.png'
|
||||
const notification = new Notification(title, {
|
||||
body: body.length > 100 ? body.substring(0, 100) + '...' : body,
|
||||
icon: '/favicon.ico',
|
||||
badge: '/favicon.ico',
|
||||
icon: notificationIcon,
|
||||
badge: notificationIcon,
|
||||
tag: `chat-${event.conversation_id}`, // 相同会话的通知会被替换
|
||||
requireInteraction: false,
|
||||
silent: false,
|
||||
|
||||
Reference in New Issue
Block a user