Commit Graph

252 Commits

Author SHA1 Message Date
3e43ac22d7 feat(core): Remove getter and setter for connectionSettings 2023-04-03 17:56:31 +02:00
47d821c02e docs(core): Add comments to NegotiationsHandler 2023-04-03 16:17:09 +02:00
355d580a9a fix(tests): Fix negotiator tests 2023-04-03 16:15:46 +02:00
03328bdf7a feat(core): Allow implementing different negotiation strategies
Fixes #27.
2023-04-03 16:05:20 +02:00
275d6e0346 feat(core): Attempt to improve the ReconnectionPolicy 2023-04-03 13:40:13 +02:00
0d9afd546c feat(core): Remove ignoreLock 2023-04-03 12:47:38 +02:00
3da334b5cf feat(core): Remove the connection lock 2023-04-03 12:46:15 +02:00
ac8433f51f chore(core): Refactor RFC6120 implementations 2023-04-02 23:33:53 +02:00
808371b271 chore(tests): Fix tests 2023-04-02 23:23:50 +02:00
7fdd83ea69 chore(xep): Clean the SASL2 implementation 2023-04-02 23:06:02 +02:00
d977a74446 feat(tests): Add an integration test for SASL2 2023-04-02 17:20:14 +02:00
29f0419154 feat(meta): Remove log redaction 2023-04-02 14:38:32 +02:00
b354ca8d0a feat(xep): Improve the ergonomics of Bind2 negotiators 2023-04-02 13:39:43 +02:00
ec6b5ab753 feat(xep): Allow inline enablement of carbons 2023-04-02 12:44:09 +02:00
ce1815d1f3 fix(tests): Fix namespace of <bound /> 2023-04-02 12:43:28 +02:00
fbb495dc2f feat(xep): Allow inlining CSI 2023-04-01 23:16:37 +02:00
4a6aa79e56 fix(xep): When using FAST, fallback to other SASL mechanisms on failure 2023-04-01 21:42:52 +02:00
0033d0eb6e feat(xep): Implement FAST 2023-04-01 21:10:46 +02:00
24cb05f91b feat(xep): Handle inline stream enablement with Bind2 2023-04-01 17:38:40 +02:00
91f763ac26 feat(xep): Allow negotiating SM enabling inline with Bind2 2023-04-01 17:16:29 +02:00
51edb61443 feat(xep): Implement SASL2 inline stream resumption 2023-04-01 15:50:13 +02:00
4e01d32e90 feat(xep): Allow setting a tag when using Bind2 2023-04-01 13:15:46 +02:00
f2fe06104c fix(core): Fix formatting 2023-04-01 13:13:19 +02:00
89fe8f0a9c feat(core): Make the PresenceManager optional 2023-04-01 13:09:43 +02:00
9358175925 feat(xep): Inline resource binding with Bind2 2023-04-01 13:00:35 +02:00
564a237986 feat(xep): Set the resource if SASL2 resulted in a resource 2023-04-01 12:51:26 +02:00
cf425917cf feat(core): Reset the resource if lastResource is null 2023-04-01 12:39:15 +02:00
63b7abd6f9 fix(core): Prevent resource binding if we already have a resource 2023-04-01 12:38:18 +02:00
f460e5ebe9 feat(core): Handle less resource binding in the core connection class 2023-04-01 12:28:11 +02:00
af8bc606d6 feat(xep): Guard against random data in the SASL2 result 2023-04-01 00:51:51 +02:00
30482c86f0 feat(xep): Implement inline negotiation 2023-04-01 00:47:45 +02:00
f86dbe6af8 feat(core): Verify the server signature with SASL2 2023-03-31 23:52:48 +02:00
478b5b8770 feat(core): Make SCRAM SASL2 aware 2023-03-31 21:09:16 +02:00
7ab3f4f0d9 feat(xep): Implement negotiating PLAIN via SASL2 2023-03-31 20:53:06 +02:00
2e60e9841e feat(xep): Begin work on SASL2 2023-03-31 19:02:57 +02:00
52ad9a7ddb fix(core): Reset the connection tracker when timing out 2023-03-31 15:53:11 +02:00
ac5e0c13b7 fix(xep): Do not subscribe to the data node 2023-03-31 15:52:50 +02:00
d4a972e073 feat(core): Close the socket on an error 2023-03-30 16:17:42 +02:00
1009a2f967 feat(core): Fix typing and remove logging parameter 2023-03-30 16:17:12 +02:00
f355f01fc8 fix(tests): Fix integration tests 2023-03-30 16:15:44 +02:00
85995d51e4 feat(core): Remove SendPingEvent 2023-03-29 17:18:03 +02:00
2557a2fe5b feat(core): Make the ping manager optional 2023-03-29 15:25:17 +02:00
4321573dfb fix(core): Fix reconnections not working properly 2023-03-21 12:01:22 +01:00
70d4d6c56f feat(core): Use _testAndSetIsConnectionRunning 2023-03-18 18:41:58 +01:00
e1e492832e chore(tests): Format and lint tests 2023-03-18 16:13:45 +01:00
de85bf848d fix(core): Fix crash when no negotiator matches
Fixes #30.

Also removes the `allowPlainAuth` attribute of `ConnectionSettings` as
users who want to disable SASL PLAIN can just not register the
negotiator or extend it.
2023-03-18 14:54:39 +01:00
7a6bf468bc test(xep): Add a test for parsing sticker packs 2023-03-16 22:04:25 +01:00
9cb6346c4d fix(style): Format and lint test helpers 2023-03-12 19:19:53 +01:00
f49eb66bb7 fix(xep): Fix usage of 'max' in publish options (#33)
This commit fixes two issues:
1. Fix an issue where [PubSubManager.publish] would always, if given
   publish options with maxItems set to 'max', use 'max' in the
   max_items publish options, even if the server indicates it does not
   support that.
2. Fix an issue with the StanzaExpectation, where it would let every
   stanza pass.
2023-03-12 19:11:55 +01:00
5b4dcc67b2 refactor(core): Remove XmppConnectionResult 2023-03-11 19:07:03 +01:00
9010218b10 refactor(core): Move connection errors into their own file 2023-03-11 19:06:28 +01:00
61144a10b3 fix(core): Minor API change 2023-03-11 19:01:55 +01:00
7a1f737c65 chore(meta): Bump version 2023-03-11 19:00:42 +01:00
546c032d43 fix(tests): Fix broken test 2023-03-11 18:59:40 +01:00
b1869be3d9 chore(docs): Update changelog 2023-03-11 18:59:22 +01:00
574fdfecaa feat(core): Merge connect and connectAwaitable 2023-03-11 18:54:36 +01:00
25c778965c feat(core): Merge connect and connectAwaitable 2023-03-11 00:10:50 +01:00
8b0f118e2d fix(style): Format using dart format 2023-03-08 20:25:45 +01:00
38155051f5 fix(style): Format using dart format 2023-03-08 19:32:03 +01:00
1000e0756b feat: Improve detecting new streams
Fixes #26.
2023-01-31 21:11:52 +01:00
902b497526 docs: Add links to the hosted documentation 2023-01-28 15:33:21 +01:00
252cc44841 feat: Make moxxmpp docs buildable using flakes 2023-01-28 15:22:37 +01:00
96d9ce4761 feat: Don't attempt reconnections when the error is unrecoverable
Fixes #25.
Should fix #24.
2023-01-28 13:20:16 +01:00
7f294d6632 fix: Bump version requirement for moxxmpp 2023-01-27 22:03:20 +01:00
e17de9065b feat: Bump moxxmpp_socket_tcp to 0.2.0 2023-01-27 22:01:32 +01:00
098687de45 feat: Bump moxxmpp version to 0.2.0 2023-01-27 21:57:26 +01:00
6da3342f22 feat: Make defining managers better 2023-01-27 21:54:16 +01:00
47337540f5 feat: Factor out "multiple-waiting" into its own thing 2023-01-27 21:14:35 +01:00
7e588f01b0 feat: Add DOAP
Fixes #11.
2023-01-27 19:09:05 +01:00
c7c6c9dae4 feat: Update Message Replies to 0.2.0
Fixes #22.
2023-01-27 19:08:57 +01:00
c77cfc4dcd feat: Change namespaces 2023-01-27 18:34:13 +01:00
1bd61076ea feat: Improve the API provided by the DiscoManager
Fixes #21.
2023-01-27 16:26:01 +01:00
bff4a6f707 feat: Rework how the ReconnectionPolicy system works 2023-01-27 00:14:44 +01:00
1cc266c675 fix: Just use shouldEncryptElement for the envelope "validation" 2023-01-23 13:11:07 +01:00
72099dfde5 feat: Only add envelope elements that should be encrypted 2023-01-23 13:10:07 +01:00
c9c45baabc feat: Allow easier responding to incoming stanzas
Should fix #20.
2023-01-23 12:47:30 +01:00
a01022c217 feat: Bump omemo_dart 2023-01-22 19:25:52 +01:00
c3459e6820 feat: Always set a cancel reason on failure 2023-01-21 20:46:45 +01:00
e031e6d760 feat: Add cancelReason if recipient likely does not support OMEMO:2 2023-01-21 15:42:00 +01:00
6c63b53cf4 fix: Fix crash with direct server IQs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-15 00:52:34 +01:00
1aa50699ad feat: Improve the stanza await system
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This fixes an issue where publishing an avatar would fail, if returned
an error where the "from" attribute is missing from the stanza.
2023-01-14 16:28:37 +01:00
b16c9f4b30 docs: Add more doc strings 2023-01-14 15:00:02 +01:00
a8d80eaddf fix: Add the closure expectation to the event 2023-01-14 12:41:17 +01:00
9baf1ed73c fix: Attempt to fix reconnection issues
Call _reconnectionPolicy.onSuccess when negotiations are done. Never
call onFailure directly; only ever call handleError.
2023-01-14 12:39:55 +01:00
ce3ea656ad fix: Stop ack timer on connection drops
Fixes #17.
2023-01-14 12:04:52 +01:00
ed49212f5a fix: Enabling carbons crashes 2023-01-13 15:17:21 +01:00
ad1242c47d feat: Try to lock reconnections behind a flag 2023-01-13 15:16:51 +01:00
890fcfb506 feat: Do initialization inline 2023-01-13 14:44:06 +01:00
d7723615fe fix: Fix message quote generation 2023-01-13 13:39:18 +01:00
6517065a1a feat: Track stanza responses as a tuple of (to, id)
Also fixes an invalid test case in the XEP-0198 tests, where
the IQ reply sets the "to" instead of the "from".
2023-01-10 12:50:07 +01:00
9223a7d403 feat: Add docs for including a tagged version 2023-01-10 12:25:56 +01:00
7ce6703c5b tests: Fix the XEP-0198 test 2023-01-09 12:53:22 +01:00
37261cddbb fix: Run Stream Management very early 2023-01-09 12:48:30 +01:00
98e5324409 fix: Copy the pre handler's encryption state 2023-01-07 22:18:20 +01:00
a69c2a23f2 fix: Bump omemo_dart version 2023-01-07 22:18:05 +01:00
d8de093e4d fix: Somewhat fix OMEMO 2023-01-07 21:57:56 +01:00
678564dbb3 fix: Roster request being treated as a roster push 2023-01-07 21:23:45 +01:00
09d2601e85 fix: Compare groups 2023-01-07 19:58:46 +01:00
41560682a1 fix: Handle roster items staying the same 2023-01-07 19:03:35 +01:00
473f8e4bb6 tests: Fix tests 2023-01-07 18:40:36 +01:00
67446285c1 feat: Refactor RosterPushEvent to RosterPushResult 2023-01-07 18:36:18 +01:00
e12f4688d3 feat: Trigger an event when the roster changes 2023-01-07 18:32:15 +01:00
2581bbe203 feat: Document the RosterStateManager better 2023-01-07 18:11:41 +01:00
995f2e0248 feat: Integrate the BaseRosterStateManager with the RosterManager 2023-01-07 16:26:15 +01:00
e2c8f79429 feat: Add a management class for roster state 2023-01-07 15:51:10 +01:00
763c93857d feat: Simplify the JID parser
Fixes #13.
2023-01-04 17:19:37 +01:00
55d2ef9c25 style: Remove newline 2023-01-02 17:53:06 +01:00
f37cbd1616 feat: Allow specifying XEP-0449's access model 2023-01-02 17:52:55 +01:00
2a3449d0f2 fix: Fix user avatar update being triggered for every PubSub event 2023-01-02 17:35:47 +01:00
596693c206 feat: Update to omemo_dart 0.4.1 2023-01-02 13:58:27 +01:00
22aa07c4ba feat: Propagate errors and encrypt to self if carbons are enabled 2023-01-02 13:52:06 +01:00
62001c1e29 feat: Upgrade omemo_dart to 0.4.0 2023-01-01 18:17:41 +01:00
ca85c94fe5 fix: Fix wrong XML serialisation 2023-01-01 16:38:54 +01:00
637e1e25a6 feat: Migrate to the new omemo_dart API 2023-01-01 16:19:25 +01:00
09696c1c4d fix: Fix VCard and User Avatar queries being encrypted 2022-12-25 13:05:16 +01:00
298a8342b8 docs: Add funding.yml 2022-12-23 15:18:53 +01:00
d64220426b feat: Implement XEP-0449 2022-12-19 14:14:05 +01:00
88efdc361c fix: Only add a <body> element when specified 2022-12-09 12:52:00 +01:00
cc1b371198 feat: Allow clients to read Message Processing Hints 2022-12-09 12:46:17 +01:00
d9e4a3c1d4 feat: Implement XEP-0444 2022-12-06 14:09:07 +01:00
0ae13acca0 chore(release): publish packages
- moxxmpp@0.1.6+1
 - moxxmpp_socket_tcp@0.1.2+9
2022-11-26 15:48:48 +01:00
d383fa31ae fix: Fix LMC not working 2022-11-26 15:48:29 +01:00
d1de394cd9 chore(release): publish packages
- moxxmpp@0.1.6
 - moxxmpp_socket_tcp@0.1.2+8
2022-11-26 15:09:05 +01:00
14c48bcc64 feat: Implement XEP-0308 2022-11-26 15:08:20 +01:00
138edffb0a chore(release): publish packages
- moxxmpp@0.1.5
 - moxxmpp_socket_tcp@0.1.2+7
2022-11-22 22:49:41 +01:00
eb8f6ba17a feat: Message events now contain the stanza error, if available 2022-11-22 22:49:10 +01:00
beff05765b chore(release): publish packages
- moxxmpp@0.1.4
 - moxxmpp_socket_tcp@0.1.2+6
2022-11-21 16:06:49 +01:00
3b7ded3b96 fix: Only stanza-id required 'sid:0' support 2022-11-21 15:27:53 +01:00
edc86a10b3 feat: Implement parsing and sending of retractions 2022-11-20 23:43:58 +01:00
39e9c55fae chore(release): publish packages
- moxxmpp@0.1.3+1
 - moxxmpp_socket_tcp@0.1.2+5
2022-11-19 22:50:39 +01:00
1b2c567787 fix: Expose the error classes 2022-11-19 22:50:28 +01:00
d3955479f7 chore(release): publish packages
- moxxmpp@0.1.3
 - moxxmpp_socket_tcp@0.1.2+4
2022-11-19 22:32:56 +01:00
300a52f9fe refactor: Replace MayFail by Result 2022-11-19 22:26:02 +01:00
2e3472d88f feat: Rework how the negotiator system works
We can now return what exactly made a connection attempt fail.
2022-11-19 21:48:28 +01:00
6b106fe365 test: Add integration test for ExponentialBackoffReconnectionPolicy 2022-11-16 20:48:18 +01:00
bfd28c281e fix: Remove the old Results API
Closes #8.
2022-11-16 15:51:33 +01:00
c307567025 chore(release): publish packages
- moxxmpp@0.1.2+3
 - moxxmpp_socket_tcp@0.1.2+3
2022-11-16 15:37:44 +01:00
5dd96f518b fix: SASL SCRAM-SHA-{256,512} should now work 2022-11-16 15:37:20 +01:00
6d9010b11c chore(release): publish packages
- moxxmpp@0.1.2+2
 - moxxmpp_socket_tcp@0.1.2+2
2022-11-12 21:49:29 +01:00
9cc735d854 fix: Fix reconnections when the connection is awaited 2022-11-12 21:49:13 +01:00
988db718a2 chore(release): publish packages
- moxxmpp@0.1.2+1
 - moxxmpp_socket_tcp@0.1.2+1
2022-11-12 21:00:16 +01:00
3172450b70 fix: A certificate rejection does not crash the connection
Fixes moxxy/moxxyv2#137.
2022-11-12 20:57:39 +01:00
848d83dc1f chore(release): publish packages
- moxxmpp@0.1.2
 - moxxmpp_socket_tcp@0.1.2
2022-11-12 12:46:36 +01:00
2f089535a3 fix(moxxmpp{,_socket_tcp): Fix path to analysis_options.yaml 2022-11-12 12:42:19 +01:00
608ba8ce4a feat(moxxmpp_socket_tcp): Make onBadCertificate available 2022-11-12 12:41:27 +01:00
d5493a185a feat: Remove Moxxy specific strings 2022-11-09 16:52:59 +01:00
5641b54f8f chore(release): publish packages
- moxxmpp@0.1.1
 - moxxmpp_socket_tcp@0.1.1
2022-11-09 16:19:22 +01:00
c850924dd3 tests: Add back tests 2022-11-08 20:44:41 +01:00
5dc4286e74 feat: Fix moxxmpp_socket_tcp's pubspec 2022-11-08 20:11:56 +01:00
7d3ec12b8b refactor: Move packages into packages/ 2022-11-08 20:05:22 +01:00