Commit Graph

83 Commits

Author SHA1 Message Date
Henri Carnot 80a4498ba9 fix: use ChildrenState for children_state in the room hierarchy response 2022-06-08 15:54:26 +00:00
Nicolas Werner 3dd7ef3444 fix: wrong types in spaces hierarchy API
BREAKING CHANGE (because from is now optional, so it can't be specified
conditionally)

See also:

- https://github.com/matrix-org/matrix-spec/pull/1110
- https://github.com/matrix-org/matrix-spec/pull/1097
2022-06-07 17:05:40 +02:00
Krille Fear fc4f004312 fix: Add missing versions to fake matrix api
This makes it easier to
use the FakeMatrixApi in
other packages for unit
tests.
2022-06-03 11:05:30 +00:00
Nicolas Werner 13b4598c83 feat: Authenticate media downloads
This is not strictly required by the spec, but it improves security to
require auth for media downloads on your homeserver. I enabled that on
my servers now and plan to MSC that soon. This is required for people on
my servers to see images and other content now.
2022-05-16 08:14:48 +02:00
Nicolas Werner d6bb91f7e1 chore: Update to matrix v1.2 2022-05-06 15:14:12 +00:00
cloudwebrtc 2fa6561f36 chore: Add GroupCallPrefix/GroupCallMemberPrefix to EventTypes.
chore: fix flutter analyze issue.
2022-05-06 22:17:33 +08:00
Lukas Lihotzki 477780d779 feat: deletePusher 2021-12-09 11:33:28 +00:00
Lukas Lihotzki 793ddddd3f feat: add additionalProperties in PusherData 2021-12-09 11:33:28 +00:00
Sorunome 454e27239c
chore: Add missing matrix error types as per spec
The full list of error codes is here:
https://spec.matrix.org/v1.1/client-server-api/#standard-error-response
2021-12-07 21:10:59 +01:00
Krille Fear 6a3c25a8bd chore: Make some tryGet errors verbose and display line
tryGet messages can spam the
logs and may be better if
they are just verbose instead
of warnings. Also now
we display the line where
this tryGet call was.
2021-11-25 08:47:19 +01:00
Krille Fear 2383cef438 feat: Colored logs on native and web
This uses the developer.logs
method to print logs on
native and console.logs on
web. Therefore we have
native colored logs
everywhere without the use
of a package. It highlights
errors and warnings on
web much better and supports
collapsing stacktraces on
web.
2021-11-25 08:26:19 +01:00
Krille Fear 6f4f69106e chore: Bump version 2021-11-10 09:48:05 +01:00
Krille Fear 238c5addb3 feat: Add constructors to SyncUpdate classes
In the SDK we have multiple points
where we use fake syncs to
update the data model.
This constructors would make it
much easier to work with them.
2021-11-10 09:31:02 +01:00
Nicolas Werner 3e7a6df81b
fix: threepidCreds should be threepid_creds and an object
For context, see https://github.com/matrix-org/matrix-doc/pull/3471

Basically the spec was wrong and didn't match what clients and servers
were doing. Might fix registration on matrix.org.

BREAKING CHANGE: Any client that implements the email portion will fail
to build now.
2021-11-04 15:23:01 +01:00
Lukas Lihotzki 7a4bb507fe chore: codegen update (convert to json explicitly) 2021-10-11 15:23:11 +02:00
Lukas Lihotzki 5c3db7a602 chore: workaround for invalid getTurnServer responses from synapse 2021-09-27 13:25:12 +02:00
Krille Fear dc0b3c715e docs: Add comment with link to issue 2021-08-30 08:02:41 +00:00
Krille Fear 5e06721639 fix: Make type in AuthenticationData nullable
It seems that there is a problem in the matrix Spec according to this.
the Spec says that the type is required and session is nullable.
But for using this endpoint:
https://spec.matrix.org/unstable/client-server-api/#client-behaviour-1-1
We need to send an auth object which only contains the session.
We should file an issue at the spec and ask there for more information.
Currently we should make type nullable as well because otherwise
this would break uiaRequests in the app for SSO.
2021-08-30 07:55:21 +00:00
Lukas Lihotzki d16c83f5db refactor: remove uploadKeySignatures (use uploadCrossSigningSignatures) 2021-08-20 16:17:40 +02:00
Lukas Lihotzki cb71ca9b26 chore: generate more operations from OpenAPI 2021-08-20 16:17:37 +02:00
Lukas Lihotzki 09198ce14d chore: update generated code 2021-08-20 16:01:26 +02:00
cloudwebrtc a554f3463d Add more call event for improve voip. 2021-08-20 20:35:23 +08:00
Lukas Lihotzki 8d795d6eaa chore: update generated code 2021-08-09 20:03:17 +02:00
Lukas Lihotzki c73b7631f5 fix: tryGet log levels 2021-08-03 16:10:55 +02:00
Christian Pauly 916711cf57 fix: Make tryget type optional by default
I see soo much annoying warnings in the logs since matrix 0.2.0
and to be honest it was never helpful to have this logs. Therefore it seems to make more
sense to make those warnings optional.
2021-08-03 10:22:45 +02:00
Lukas Lihotzki cfa633b489 feat: Add image pack event content models 2021-07-22 17:08:36 +02:00
Lukas Lihotzki bad334d441 refactor: FilterMap extension 2021-07-19 19:43:56 +02:00
Lukas Lihotzki c10a98ff35 fix: log levels for tryGet 2021-07-07 15:30:42 +02:00
Marcus Hoffmann 0b8e3f3071 make tryGet* safer
* check casts (for list and map) at cast time by recreating the list/map
  instead of throwing on access.
* type warnings work now slightly differently:
  * when we expect nullable fields to be actually null within normal
    operation you can explicitly set the tryGet type param to an
optional type and mute the warning. Otherwise it'll warn that something
is null which we expect to something else.
2021-07-02 12:17:05 +02:00
Lukas Lihotzki c73ea67bcd add note about txnId 2021-07-02 11:36:42 +02:00
Lukas Lihotzki bf3bed9ef9 simpler toMap 2021-07-02 11:18:16 +02:00
Lukas Lihotzki 0d1e7bdf7b omit type in tryGet 2021-07-02 11:11:29 +02:00
Marcus Hoffmann faabc55d28 isServer and isAccessToken are optional 2021-07-01 18:05:56 +02:00
Marcus Hoffmann dd7a824512 remove user field from AuthenticationPassword structure
it's not in the spec
2021-07-01 18:01:07 +02:00
Marcus f5dbacfe07 remove leftover migration tool comment 2021-07-01 15:50:42 +00:00
Marcus Hoffmann 92a2bd9d7e null safety test fixes 2021-07-01 17:36:21 +02:00
Marcus Hoffmann 34b9cc0dcf filter out invalid CiphertextInfo instead of crashing 2021-07-01 17:15:06 +02:00
Marcus Hoffmann 1a51f813a7 null safety cleanup 2021-07-01 16:59:54 +02:00
Lukas Lihotzki 9e6019b820 fix: return Never 2021-07-01 15:13:45 +02:00
Lukas Lihotzki d9c1fdb78a refactor: migrate to null safety 2021-07-01 15:11:39 +02:00
Lukas Lihotzki 1b84de0b44 refactor: remove timeouts in matrix_api_lite 2021-06-25 12:40:03 +02:00
Lukas Lihotzki e3a1b6aa77 refactor: mostly use dart_openapi_codegen 2021-06-25 12:40:03 +02:00
Christian Pauly 3a6d224348 fix: Log filter in wrong direction 2021-06-10 09:21:20 +02:00
Christian Pauly 9b3768300e fix: Logs should only printed if loglevel is high enough 2021-06-09 10:11:56 +02:00
Christian Pauly c70b149c20 change: Remove logger
The logger package has a lot of issues.
The colors are not working in web and on iOS.
Emojis are not working on some platforms.
It introduced a not very important library in a SDk which is intended to
be as minimal as possible.
This simplifies the logging to a format which works everywhere.
The # Syntax makes it also look good as markdown.
It is not very far away from the default syntax of errors and stacktraces.
It still provides several log levels, the same API and a list of output events for the logviewer.
2021-05-12 12:14:04 +02:00
Lukas Lihotzki 3eaf4ef99a feat!: operation names from OpenAPI spec 2021-05-07 13:43:06 +02:00
Christian Pauly d667f63675 refactor: Enable more lints 2021-05-05 12:32:20 +02:00
Lukas Lihotzki 846c96e90d refactor: move identifier type detection into AuthenticationIdentifier 2021-05-05 12:08:03 +02:00
Lukas Lihotzki 2fdf3e8284 refactor: polymorphism can be used without manual switch statement 2021-05-05 12:05:26 +02:00
Lukas Lihotzki 4069f0a02f refactor: avoid string conversion for comparison 2021-05-05 12:05:26 +02:00