|
|
@ -18,8 +18,8 @@ export function initNotify() {
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: 需要增加所在群组
|
|
|
|
// TODO: 需要增加所在群组
|
|
|
|
if (Notification.permission === 'granted') {
|
|
|
|
if (Notification.permission === 'granted') {
|
|
|
|
Promise.all([getCachedUserInfo(currentUserId)]).then(([userInfo]) => {
|
|
|
|
Promise.all([getCachedUserInfo(message.author)]).then(
|
|
|
|
console.log(userInfo, message);
|
|
|
|
([userInfo]) => {
|
|
|
|
const nickname = userInfo?.nickname ?? '';
|
|
|
|
const nickname = userInfo?.nickname ?? '';
|
|
|
|
const icon = userInfo?.avatar ?? undefined;
|
|
|
|
const icon = userInfo?.avatar ?? undefined;
|
|
|
|
const content = message.content;
|
|
|
|
const content = message.content;
|
|
|
@ -30,7 +30,8 @@ export function initNotify() {
|
|
|
|
tag: 'tailchat-message',
|
|
|
|
tag: 'tailchat-message',
|
|
|
|
renotify: true,
|
|
|
|
renotify: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|