-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace storage.fetch_annotation
with an AnnotationReadService
#7947
Conversation
6d28234
to
236be2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, going in the right direction with the service approach.
h/notification/reply.py
Outdated
@@ -62,7 +62,7 @@ def get_notification( | |||
# Now we know we're dealing with a reply | |||
reply = annotation | |||
|
|||
parent = storage.fetch_annotation(request.db, parent_id) | |||
parent = request.find_service(AnnotationReadService).get_annotation_by_id(parent_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh why not just annotation.parent
? because the whole references thing makes that not trivial 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think there's any good reason really. I've swapped this over.
This involved a rewrite of the tests, because they were quite strange
236be2b
to
77d90d4
Compare
For:
Testing notes
In H / Via / ViaHTML / Client:
In one tab:
devdata_user
/pass
In another private tab:
devdata_admin
/pass
Websocket
Notification reply
/mail/*
in yourh
directorymail/
dir, it should have an*.eml
fileNearly anything which has a route on the annotation traversal
There are a bunch in routes which use the traversal, but flag is probably the easiest