Comments (5)
I dug through a bit of the docs you linked to and agree that it doesn't seem possible to set with the currently exposed electron API. We've discussed this internally and don't think we have any major reservations to add deliverImmediately
. Will get a PR up soon.
from santa.
On the surface this seems maybe ok, though I am admittedly not super familiar with details on how distributed notifications work and have some minor concerns.
The documentation for Posting Distributed Notifications has some interesting tidbits:
An observer of a given notification may be in a suspended state and not processing notifications immediately. If an object posting a notification wants to ensure that all observers receive the notification immediately (for example, if the notification is a warning that a server is about to shut down), it can invoke postNotificationName:object:userInfo:deliverImmediately: with deliverImmediately:YES. The notification center delivers the notification as if the observers had registered with NSNotificationSuspensionBehaviorDeliverImmediately
(emphasis on that final sentence)
Looking into documentation for Registering for Distributed Notifications:
NSNotificationSuspensionBehaviorDeliverImmediately
: The server delivers notifications matching this registration irrespective of whether it has received the setSuspended:YES message. When a notification with this suspension behavior is matched, it has the effect of first flushing any queued notifications. The effect is as if the server received setSuspended:NO while the application is suspended, followed by the notification in question being delivered, followed by a transition back to the previous suspended or unsuspended state.
Can you test if you get the desired behavior by setting the appropriate suspensionBehavior
? If so this would likely be preferable rather than Santa forcing delivery.
from santa.
Thanks for the response!
I am looking, but so far I am not sure I can set the suspensionBehavior inside electron.
from santa.
Here is what I have found out:
The Electron code to register for a notification is here.
It is using the addObserverForName method.
As noted in the discussion, that method uses NSNotificationSuspensionBehaviorCoalesce for the suspensionBehaviour.
Still looking...
from santa.
Wow! Thanks very much!
from santa.
Related Issues (20)
- UI configuration options HOT 3
- An error occurred communicating with the daemon, is it running? HOT 6
- Use SecTaskGetCodeSignStatus for Platform Binaries HOT 4
- Can't install the sample profile- The profile must originate from a user approved MDM server. HOT 2
- Any way to avoid chunked encoding? HOT 8
- Certificate SHA256 hashes are case-sensitive HOT 5
- Present information in the Santa blocked pop-up so it is more readily copy/pasted to a new rule HOT 2
- Incorrect event decision code being synced to server (ALLOW_UNKNOWN instead of ALLOW_TEAMID) HOT 5
- Allow events not being sent to sync server in Lockdown mode HOT 5
- Config: Add ability to include custom headers in sync requests
- Simple developer bootstrap - still possible? HOT 2
- v2023.6 Does not Apply Path Scope Rules HOT 1
- How to build santa universal binary HOT 8
- Unable to enable lockdown mode HOT 5
- Enhancement idea: Wildcards in SigningID rules HOT 4
- Compiler rules not allowing specified compiler binary to run? HOT 7
- Unable to get transitive rules working with XCode HOT 13
- Intellij IDE Debugging Blocked in Lockdown Mode HOT 6
- Feature Request: System Notifications in Monitor Mode HOT 4
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 santa.