-
Notifications
You must be signed in to change notification settings - Fork 6
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
♻️ [#2257] Fetch subscriptions for user directly from Laposta #1138
♻️ [#2257] Fetch subscriptions for user directly from Laposta #1138
Conversation
ad9a120
to
690c1f8
Compare
d00f0db
to
889b6fa
Compare
@Bartvaderkin to review, after approval can be merged |
src/open_inwoner/laposta/client.py
Outdated
# The API cannot deal with urlencoded email addresses that contain a `+`, | ||
# so instead we fetch all members for a given list and check if there is a | ||
# member with a matching email |
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.
Having to retrieve everything is not ideal because there could be thousands of subscribers. Are we sure about the url encoding (quote plus etc)? It'd be weird if they can't handle name+dummy@gmail.com
that people use all the time.
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.
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.
Good tests, but it feels like something is wrong that we need to download the while subscriber database to look at a single user's subscriptions.
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.
I'll email Laposta to ask if they know about this issue, but in the meantime I'm not sure if there is another (easier) way to fix this
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.
Ok cool, will be interesting. If it takes too long or they don't have anything we can use this solution and see.
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.
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 well, I'll do that instead then
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.
Removed the workaround and replaced it with double quoting in 504b250
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1138 +/- ##
==========================================
Coverage ? 95.05%
==========================================
Files ? 941
Lines ? 33156
Branches ? 0
==========================================
Hits ? 31518
Misses ? 1638
Partials ? 0 ☔ View full report in Codecov by Sentry. |
src/open_inwoner/laposta/client.py
Outdated
# The API cannot deal with urlencoded email addresses that contain a `+`, | ||
# so instead we fetch all members for a given list and check if there is a | ||
# member with a matching email |
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.
Good tests, but it feels like something is wrong that we need to download the while subscriber database to look at a single user's subscriptions.
e923445
to
9ade80c
Compare
9ade80c
to
e9c74d9
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.
Noting I need to update this with the verified_email
task: https://taiga.maykinmedia.nl/project/open-inwoner/task/2257
Notes: