Comments (19)
Just to be clear, the preferred way on MacOS is to use the notifications API, so that do-not-disturb mode and other OS behavior is consistent.
from element-desktop.
Op here. FWIW, for me this was solved by migrating to the web version, to PWA app within Chrome to be exact.
from element-desktop.
Hi @HarHarLinks , the mentioned specs are unrelated to this bug. They are a great feature, but the bug here is about being a good platform citizen as a desktop app.
from element-desktop.
I would really like this feature to be implemented. Element is the only application I run on my desktop (Fedora Linux 38 with KDE Plasma Desktop) that does not respect the system-wide do-not-disturb setting. Even Slack (also an Electron app) respects the setting properly.
from element-desktop.
@tawfiek In general, I think this is a good idea. It always seems suspect to me to rely on 3rd party libraries whose code has not been audited and which cannot be absolutely authenticated. AFter all, this is communication software for private data...
from element-desktop.
The Do Not Disturb mode on gnome is the dconf setting /org/gnome/desktop/notifications/show-banners
. Element notifs should already be blocked by the setting, but sounds won't be. We will need to find a library that allows us to listen on dbus for when this value is updated.
from element-desktop.
There seem to be a user space lib to detect dnd mode on mac: https://github.com/felixrieseberg/macos-notification-state
My workaround is to close element app when I'm expecting to focus on work. Not ideal one may say /sarcasm
from element-desktop.
:/ I don't think Electron has a built in way to tell if DND is enabled. Looks like Electron recommends using this library https://github.com/felixrieseberg/electron-notification-state which only has one commit... maybe it's just really stable and good at it's current state?
from element-desktop.
That felixrieseberg library just wraps two other libraries for fetching mac/windows notification states (also written by felixrieseberg, and with 7 and 9 commits respectively). Scanning the code it does look feasible that it might just work?
from element-desktop.
As explained in element-hq/element-web#13941, the same happens in linux.
from element-desktop.
#133 should hopefully address folks on GNOME
from element-desktop.
Electron does not support accessing that API seemingly, but closest we can get is to try and read the DND state using https://www.electronjs.org/docs/tutorial/notifications#do-not-disturb--session-state
from element-desktop.
Electron does not support accessing that API seemingly, but closest we can get is to try and read the DND state using https://www.electronjs.org/docs/tutorial/notifications#do-not-disturb--session-state
Electron refers to the same package of felixrieseberg in there official docs, but in the package's GitHub repo I found more than one issue complaint that this package is deprecated for the newer versions of node, I think it's a bad Idea to rely on it in element.
maybe we can fork it update it's dependencies and republish it, then use it into our codebase or ...
"it" refers to the packages that this lib wrap, since it just a warper for : macos-notification-state
and windows-notification-state
written with the same guy as @lampholder said
from element-desktop.
We have a do not disturb mode in user settings now. We could hook the OS level setting to honour that user preference.
From what I understand we will only be able to do that on the Electron side as the media queries are not exposing any of that
from element-desktop.
We have a do not disturb mode in user settings now.
This was removed from labs in matrix-org/matrix-react-sdk@4d7b7c4 and I miss it dearly.
from element-desktop.
surely there is a way 4 years later to use the native notification system and get do not disturb following for free, right? Is this not annoying others?
from element-desktop.
There is some related spec work (currently not progressing):
matrix-org/matrix-spec-proposals#3026
matrix-org/matrix-spec-proposals#3767
from element-desktop.
Here's a PR from Mattermost, another electron-based messenger, implementing this:
from element-desktop.
@uzantome looks like it only supports Linux & Windows, and would create extra cost on the latter as it'd require signing extra binaries
from element-desktop.
Related Issues (20)
- Unwanted "Help me write" Google integration, perhaps related to Google Gemini HOT 3
- Element Nightly: Message search initialisation failing HOT 2
- "Missing session data" screen: Logout button not working HOT 1
- Visual accessibility: Font size, UI scaling HOT 1
- Unable to access microphone a second time after making a call HOT 2
- "Missing Session Data" error HOT 3
- Element echoes even everything is set up properly HOT 1
- v1.11.68 upgrade causes a disconnection when you attempt to share your screen HOT 4
- v1.11.68 update causes Element window to move upwards and left when toggling visibility HOT 1
- Unable to search fully in one encrypted private room HOT 1
- Manual verification fails due to erroneous e2ee disabled message HOT 5
- Fixing blank screen on Windows HOT 1
- force auto-raise/focus-pull on new notification HOT 2
- Custom font resets when changing between light/dark mode HOT 1
- Any official distribution channel supporting most popular Linux distros (AppImage, Flatpak, binary installer, anything) HOT 3
- Notifications are shown for every single new message received after turning monitor off (Win10) HOT 6
- Do not open a conversation at startup HOT 1
- Call stops when trying to share a screen HOT 1
- macOS sandbox HOT 1
- Clicking on notifications don't bring Element to the top on macOS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from element-desktop.