02b3380ac3
Replace ensure_future calls with create_task
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-19 21:40:33 +02:00
fa3e690154
Use asyncio.create_task to fix asyncio.wait deprecation notice
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-19 21:40:03 +02:00
73bc6b7803
my_fingerprint: public_bundle.serialize isn't awaitable
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-11 12:15:54 +02:00
4bc8c5e6b6
get_devices and get_active_devices return Iterable[int] now
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-11 10:56:54 +02:00
cda11a82bc
Await get_active_device call in fetch_bundles
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-11 10:51:09 +02:00
8e9add345a
Expose fetch_devices and fetch_bundles
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-07-10 22:31:25 +02:00
7324193966
Don't expose fetch_devices and fetch_bundle
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-04-03 20:36:37 +02:00
882b4d2294
Rename make_heartbeat to send_heartbeat
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:16:43 +01:00
c8341e0f83
Make fetch_devices and fetch_bundle public
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:16:43 +01:00
3a85411df8
f-strings
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:16:43 +01:00
13052817bf
Remove get_device_list in favor of get_devices and get_active_devices
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:16:43 +01:00
48b0610f89
delete_session: new API
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:16:41 +01:00
4bfeb6b002
is_encrypted: now a staticmethod
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 20:07:25 +01:00
f4d2412443
encrypt: pass bundle in to encryptRatchetForwarding if available
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 19:50:44 +01:00
2c4dc24b84
decrypt: ensure_future is no more required
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-24 19:50:11 +01:00
e4c9b54b85
Ensure heartbeats are stored in the archive
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-12 01:27:15 +01:00
dbeaca6b6a
typo in decryptRatchetForwardingMessage method name
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-11 23:43:35 +01:00
488c254523
Add logging in _should_heartbeat
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-10 14:23:43 +01:00
a6ce12c0b3
encryptRatchetForwardingMessage: missing device_id param
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-10 13:41:02 +01:00
f00580e268
encrypt*Message: use named parameter for bundles
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-10 13:04:45 +01:00
05e6ff3b8e
encryptRatchetForwarding doesn't have an expect_problems parameter anymore
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-10 13:02:13 +01:00
3e92fc0516
encryptRatchetForwardingMessage: bundle isn't required for our use-cases
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-04 12:34:19 +01:00
6ab8bba4f0
Use new encryptRatchetForwardingMessage API added in f3c3a45e
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-03 20:02:00 +01:00
bf3f5472f7
Rename variable so types don't conflict
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-03 19:58:21 +01:00
a7e969b078
should_heartbeat: Ensure prekey variable is always availabe in scope
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-02 00:32:47 +01:00
3681856d54
Please linter, change import order
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01 22:49:24 +01:00
c936703941
Only call should_heartbeat if auto_heartbeat is enabled
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-01 22:47:12 +01:00
02b6afe10d
Add debug logging, lots
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-02-18 14:25:26 +01:00
2a9bade333
Rename short variable
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
28fe0d04c7
Remove unused variable in for loop
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
9e67d7d887
Use the new receiving_chain_length endpoint
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
80cdab3ba3
is_encrypted doesn't require the plugin to be instanciated
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
8e44c07aed
Specify local=False parameter to ['xep_0030'].get_info
...
The API here might have changed? It seems this call was going just fine
until it wasn't. It was returning an empty string. Adding `local=False`
seems to force it to fetch the info remotely and return a proper Iq.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
29bf6e8650
Update omemo lib to 0.13 and asyncio changes
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-16 01:06:26 +01:00
080a27e7d8
Add 0030 as a direct dependency
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-15 22:50:10 +01:00
05b5705f22
Don't fail on decrypting heartbeats
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-12-14 17:20:16 +01:00
494899bb3c
Add interface semi-hidden to RatchetForwardingMessage
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-18 00:30:07 +02:00
26665d9e6a
should_heartbeat: factor out in internal method to avoid reparsing message
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17 20:18:47 +02:00
bb52d93241
should_heartbeat: also return True on new sessions
...
And the docstring now reflects the reality again!
We're parsing the Encrypted dict again, when we just did it in
decrypt_message above, but this function is also part of the API and
doing that for them is the least we can do.
Maybe there should be an internal function that we can call from
decrypt_message, that also gets called by should_heartbeat.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17 18:58:31 +02:00
91a04000d7
Treat receiving chain length None as 0
...
It appears a receiving chain length set to None just means we haven't
received any message for this session yet. It doesn't make sense to spam
heartbeats at this stage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17 11:31:36 +02:00
baf29cb05f
should_heartbeat: correctly return what last commit said
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17 03:39:48 +02:00
c7a0a092d4
should_heartbeat: also take into account unacked sessions
...
receiving_chain_length would sometimes be None (thanks python strict
typing) causing the thing to fail.
When this is the case, I assume this means the session hasn't been
confirmed from our side yet and it would be good to ACK it. (To be
confirmed with people who know, in progress).
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-17 02:56:57 +02:00
a2a287ee5d
don't include empty sessions in _chain_lengths method
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-16 21:49:55 +02:00
7a887ccac3
Pass correct argument type to should_heartbeat call
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-16 21:37:56 +02:00
59543ac585
Add missing argument to should_heartbeat call
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-16 21:31:57 +02:00
aa54f58649
Always publish on session_start
...
The condition wasn't necessary in session_start for PEP nodes not to be
published multiple times.
This also fixes the fact that we weren't publishing on reconnect.
And also fixes one indentation level too many in the _initial_publish
method.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-15 00:46:35 +02:00
fbe5e36c3e
Fix #10 : ensure device list and bundle are published after startup
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-15 00:46:35 +02:00
7e079f4260
make_heartbeat needs to be async
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-14 09:45:15 +02:00
95481e64b2
decrypt_message: don't always send heartbeat
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-14 09:45:15 +02:00
89eb4dfece
decrypt_message: msg.send isn't a coroutine
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-07-14 09:45:15 +02:00