Isaiah Inuwa
993cd30f46
Add joke bot example.
2022-01-03 15:44:17 -06:00
gnieto
824cefb3e9
Properly validate localpart when parsing UserId
...
When a `UserId` was created via `parse_with_server_name` (and its
variants), the localpart was not validated. This lead to invalid user
ids being constructed and lead to a crash when `is_historical` was
called.
This changes will prevent that this invalid user is can be constructed.
2022-01-03 14:58:38 +00:00
Jonas Platte
3cb728e61a
Enforce most serde_json import renames through clippy
2022-01-03 12:28:15 +01:00
Jonas Platte
21239bcf1a
Remove serde imports section from CONTRIBUTING.md
...
These rules can now be enforced by clippy.
2022-01-03 12:21:11 +01:00
Jonas Platte
a67738a3fb
Move and expand formatting / linting section of CONTRIBUTING.md
2022-01-03 12:10:33 +01:00
Jonas Platte
069afd7811
Remove some formatting instructions from CONTRIBUTING.md
...
… since they are automatically enforced by rustfmt.
2022-01-03 11:57:30 +01:00
Jonas Platte
9621b83d49
Use doc_auto_cfg for automatic cfg documentation
2022-01-02 19:22:42 +01:00
Kévin Commaille
fac7d53134
client-api: Fix get_login_types::CustomLoginType
...
Add test for it.
2022-01-01 12:54:59 +01:00
Guillaume
9ee0436eb8
Check spec links version for v1.1
2021-12-29 08:48:27 +01:00
Guillaume
08df981b3b
Clarify matrix' spec version in CONTRIBUTING.md
2021-12-29 08:48:27 +01:00
homersimpsons
2d3816d72c
ruma-events: Add links to specs in modules docs
2021-12-28 14:36:34 +00:00
Jonas Platte
18a113444a
Upgrade tracing-subscriber
2021-12-27 18:37:01 +01:00
Jonas Platte
16b649025c
push-gateway-api: Rewrap comment
2021-12-23 22:50:01 +01:00
Jonas Platte
7cf3abbaf0
state-res: Remove unnecessary cloning
2021-12-22 17:46:05 +01:00
Jonas Platte
6abfe3ff70
state-res: Remove unnecessary allow attribute
2021-12-22 17:45:50 +01:00
Jonas Platte
f161c8117c
client: Fix tests under client-api feature flag
2021-12-21 09:48:12 +01:00
Jonas Platte
90be9acf08
ruma: Add client-ext-client-api to full feature group
2021-12-21 09:36:50 +01:00
Jonas Platte
abfb9075da
ci: Ensure ruma-client builds without any features active
2021-12-21 09:36:30 +01:00
Jonas Platte
71e27b7880
ci: Test ruma-client feature client-api for MSRV
2021-12-21 09:36:03 +01:00
ftilde
6b78988d39
ruma-api-macros: Avoid empty POST/PUT request bodys
2021-12-18 20:06:37 +01:00
Jonas Platte
57e84f862b
client-api: Fix unnecessary allocation in URL construction
2021-12-18 20:05:28 +01:00
Jonas Platte
2f732bf9c2
signatures: Implement room version 9 redaction change
2021-12-17 18:58:40 +01:00
Jonas Platte
7290860019
state-res: Add support for room version 8 join restrictions
...
Co-authored-by: Devin Ragotzy <d6ragotzy@wmich.edu>
2021-12-17 18:58:32 +01:00
Jonas Platte
57cbe491f0
Move RoomVersionId::V7 out of unstable-pre-spec
...
Matrix v1.1 stabilized room version 7.
2021-12-17 18:51:38 +01:00
Jonas Platte
d3679c1902
federation-api: Use Raw around CrossSigningKey, DeviceKeys, OneTimeKey
2021-12-14 15:37:00 +01:00
Jonas Platte
1a9047a715
ruma: Propagate unstable-pre-spec feature to ruma-identifiers
...
Happens indirectly as well, but more future-proof this way.
2021-12-14 12:45:01 +01:00
Jonas Platte
c082969d16
Adjust to clippy lint rename
2021-12-10 13:10:58 +01:00
Jonas Platte
75283845bc
appservice-api: Remove pointless import
2021-12-09 22:59:50 +01:00
Jonas Platte
7e3b727d04
Fix / silence clippy lints
2021-12-09 15:50:42 +01:00
Jonas Platte
7ebe660402
common: Add compatibility hack for empty-string canonical_alias
2021-12-09 12:38:30 +01:00
Jonas Platte
28371945de
client-api: Remove unused PublicRoomsChunk type
...
There's a copy of this type in ruma-common which is actually being used.
2021-12-09 12:37:56 +01:00
Damir Jelić
fdbc4d6d1d
ruma-client-api: Use just a BTreeMap for the /keys/upload fields
2021-12-06 11:26:14 +01:00
Damir Jelić
ee3c8f3335
ruma: Fix a bunch of typos
2021-12-06 11:26:14 +01:00
Damir Jelić
caa3c05db3
client-api: Add support for fallback keys
...
This implements support for MSC2732[1], fallback keys. Only support to
upload and get notifications about fallback keys via `/sync` is
implemented.
[1]: https://github.com/matrix-org/matrix-doc/pull/2732
2021-12-06 11:26:14 +01:00
Damir Jelić
af0a8f009c
client-api: Update the backup API to use raw variants of types
...
Similarly to the way structs holding public keys require signature
verification, the BackupAlgorithm struct may require verification as
well.
This lets users know if a certain device trusts the BackupAlgorithm and
if it should be used to upload room keys to the backup.
2021-12-06 11:26:14 +01:00
Damir Jelić
786ab15c0c
client-api: Use Raw variants to upload/download keys
...
Uploaded objects holding public keys tend to have the object signed by
the very same key that is part of the object. Users that download such
public keys are expected to verify the signature to confirm that the
public key and its surrounding fields in the object have not been
manipulated with.
The SignedKey, DeviceKeys, and CrossSigningKey structs
perform a lossy variant of deserialization, which removes the ability to
verify signatures of the aforementioned objects.
This patch changes the response types to a Raw variant, which let's the
user decide how to deserialize.
2021-12-06 11:26:14 +01:00
Jonas Platte
96374a7517
state-res: Rename RoomVersion::VERSION{num} to RoomVersion::V{num}
2021-12-04 18:59:39 +01:00
Jonas Platte
a1cf04076c
state-res: Remove unused RoomVersion::version field
2021-12-04 18:58:38 +01:00
Devin Ragotzy
7f0913ccd7
state-res: Add membership check for Knock behind unstable feature
2021-12-04 18:48:03 +01:00
Jonas Platte
c48aead00e
identifiers: Replace qualified paths with imports
2021-12-01 19:51:38 +01:00
Jonas Platte
16f031fabb
state-res: Make the API generic over the event ID storage
2021-11-27 23:18:34 +01:00
Jonas Platte
a9c12f0909
state-res: Remove EventMap type alias
2021-11-27 22:44:34 +01:00
Jonas Platte
399bd7d82d
state-res: Rename generic parameter
2021-11-27 18:13:32 +01:00
Jonas Platte
881f64fd64
signatures: Simplify imports
2021-11-27 01:26:02 +01:00
Devin Ragotzy
d15c877ad1
events: Update m.room.member for room versions 7 - 9
...
* Add join_authorized_via_users_server key for roomver 8+
* Add custom redaction impl for RoomMemberEventContent
2021-11-26 22:11:28 +00:00
Jonas Platte
bba7d62442
identifiers: Add Rc
/ Arc
parsing constructors
2021-11-26 21:03:11 +01:00
Jonas Platte
6324034f03
identifiers: Generate public parse
functions for opaque ID types with invariants
2021-11-26 20:57:47 +01:00
Jonas Platte
87194d5bf9
identifiers: Consolidate unsafe code
2021-11-26 20:41:59 +01:00
Jonas Platte
9ed75241a6
state-res: Refactor lexicographical_topological_sort
...
Gets rid of unnecessary copying and makes things more explicit by using
a struct with named fields instead of a tuple for tie breaking.
Co-authored-by: Jonathan de Jong <jonathan@automatia.nl>
2021-11-26 20:22:57 +01:00
Jonas Platte
6c48926649
identifiers: Add more conversions for RoomOrAliasId
2021-11-26 17:50:29 +01:00