mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 09:16:44 +00:00
fix: electron api
This commit is contained in:
parent
15e591f30d
commit
ce1712fed1
@ -105,9 +105,12 @@
|
||||
|
||||
let isFocused = document.visibilityState !== 'visible';
|
||||
if (window.electronAPI) {
|
||||
isFocused = await window.electronAPI.send({
|
||||
const res = await window.electronAPI.send({
|
||||
type: 'window:isFocused'
|
||||
});
|
||||
if (res) {
|
||||
isFocused = res.isFocused;
|
||||
}
|
||||
}
|
||||
|
||||
if ((event.chat_id !== $chatId && !$temporaryChatEnabled) || isFocused) {
|
||||
@ -155,9 +158,12 @@
|
||||
|
||||
let isFocused = document.visibilityState !== 'visible';
|
||||
if (window.electronAPI) {
|
||||
isFocused = await window.electronAPI.send({
|
||||
const res = await window.electronAPI.send({
|
||||
type: 'window:isFocused'
|
||||
});
|
||||
if (res) {
|
||||
isFocused = res.isFocused;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!channel || isFocused) && event?.user?.id !== $user?.id) {
|
||||
|
Loading…
Reference in New Issue
Block a user