feat: Improve the workflow of monitor / decrypting notifications #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All of this work is up to discussion, I'm really not sure the best way to handle this stuff.
-What I did
I am mostly brainstorming on how to improve how we actually use monitor / decrypt notifications since right now it's a bit messy.
I created a AtNotificationService that would handle all of the monitor stuff. I left notify in at_client but we can easily move it later.
We now use a generator method in order to yield incoming at_events. In order to thoroughly implement notifications in an app I still suggest to use an additional thread to manage incoming notifications.
I modified
handle_event
a bit, there was 2 changes:Queue
,decrypted_events
, for specifically decrypted notifications.notify:remove
command to get rid of notifications sitting around.- How I did it
- How to verify it
I was testing it in parallel with sshnpdpy, so here are some examples on how to use the methods.
I'll begin writing unit tests for this.
- Description for the changelog
feat: Improve the workflow of monitor / decrypting notifications