-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Matrix Long Lived Token: Don't logout, and use UUIDv4 for transactionIds #1249
Conversation
…r Remove Whitspace
So, this works, passes flake8. Wont pass another check citing that Open to suggestions on how to get it to pass the test cleanly. Edit. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1249 +/- ##
=======================================
Coverage 99.37% 99.37%
=======================================
Files 148 148
Lines 20641 20645 +4
Branches 3674 3675 +1
=======================================
+ Hits 20511 20515 +4
Misses 121 121
Partials 9 9 ☔ View full report in Codecov by Sentry. |
Description:
Related issue (if applicable):
The previous PR seems to work for the first message of each channel. #1236 However, after sending one message, it logs me out and stops working.
In addition to that, the existing cache system was designed to login, then use that session until apprise is shut down. Then log in again, get a new session and start from 0. There appears to be a different storage option, but it's not clear from the code exactly if it would work if the container is restarted or
docker compose down
. Additionally, it seems20d
is the default max cache length. Whichinfinite
is what we need.On with the changes:
UUIDv4
here. In the Matrix v3 spec it recommends either that or the incrementer, which is what we have. See https://spec.matrix.org/v1.12/client-server-api/#transaction-identifiers . The current implementation is just an growing integer.This version I have running just fine all day on my build, mounting it overtop the
apprise-api
defaultmatrix.py
.It is possible, but incredibly unlikely that a
UUIDv4
could repeat within the life of a session. https://jhall.io/archive/2021/05/19/what-are-the-odds/ and whenmatrix-synapse
resets, I bet it forgets all the endpoints associated with a token making it that much more unlikely that anyone would ever see this happen.If I'm totally wrong about how the storage is done and it should be done, I'd like to know more. It seemed like it wasn't going to work that way.
Checklist
flake8
)Testing