fix: 修复notify插件显示名称不对的bug

release/desktop
moonrailgun 3 years ago
parent df0e6f23eb
commit 0f4a3ec7a2

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

Loading…
Cancel
Save