1580 Commits

Author SHA1 Message Date
Kévin Commaille
67abaf4de1 identifiers: Add From<OwnedId> impls for String 2022-11-12 11:13:34 +01:00
Kévin Commaille
c75d97772c identifiers: Deduplicate as_str() based impls between ID DSTs and owned IDs 2022-11-12 11:13:34 +01:00
Kévin Commaille
e8bec10c6d push: Make SimplePushRule generic over the type of the rule_id 2022-11-12 10:59:52 +01:00
Jonas Platte
ae3394a6df api: Turn metadata name and description fields into docstrings 2022-11-12 10:17:24 +01:00
Jonas Platte
bdb5950fe4 macros: Remove ruma_api! macro 2022-11-12 10:17:24 +01:00
Jonas Platte
80c060cb69 Remove usage of ruma_api! 2022-11-12 10:17:24 +01:00
Kévin Commaille
c5fb935472 macros: Add .m.rule.snake_case rename rule for StringEnum 2022-11-12 09:55:57 +01:00
Kévin Commaille
eecae05721
events: Change IgnoredUserListEventContent to use a map of empty structs 2022-11-11 21:48:14 +01:00
Jonas Platte
2500e8f8fa api: Make query_string parameter of make_endpoint_url non-optional
When Some(_), the argument would often be an empty string. By always
using the empty string to mean "no query", we avoid trailing a `?` on
URLs without having two parameter values that mean the same thing.
2022-11-11 11:27:07 +01:00
Jonas Platte
d25e40764b client-api: Fix warnings when compiling with client and without server feature 2022-11-11 11:09:32 +01:00
Jonas Platte
dd67745e4d events: Add convenience constructors for MessageType 2022-11-11 11:06:33 +01:00
Jonas Platte
9f11510427
client-api: Fix serialization of endpoints with optional path segment 2022-11-11 10:48:15 +01:00
Jonas Platte
a8ba82d585 api: Make EndpointError construction infallible
Simplifies error matching and preserves more information for
non-spec-compliant server errors.
2022-11-10 13:10:57 +01:00
Jonas Platte
7d018897b0
macros: Move ensure_feature_presence check from ruma_api to request / response 2022-11-10 11:33:18 +01:00
Jonas Platte
2451f33a64
api: Replace ruma_api! compile-time path check with a test 2022-11-10 11:33:17 +01:00
Jonas Platte
9195a5de18
api: Make VersionHistory fields private 2022-11-10 11:33:17 +01:00
Jonas Platte
08dcf1e224
api: Add VersionHistory::{deprecated_in, removed_in} 2022-11-10 11:33:17 +01:00
Jonas Platte
866b01d0c2
api: Rename VersionHistory::added_version to added_in
… and reword its documentation.
2022-11-10 11:33:17 +01:00
Jonas Platte
848ca9b225
api: Rework VersionHistory path accessors
* Return iterators
* Rename all_unstable_paths to unstable_paths
* Rename all_versioned_stable_paths to stable_paths
2022-11-10 11:33:17 +01:00
Jonas Platte
94990f60f2 events: Don't skip serializing empty content of redacted events 2022-11-09 17:11:50 +01:00
Damir Jelić
6d133971b0
events: Add support for MSC3783 in the key verification events 2022-11-09 16:45:24 +01:00
Kévin Commaille
05356d7d4e push: Add method to change the actions of push rules in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
96642e3a1b push: Add method to change the enabled state of push rules in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
f87714d73f push: Add method to insert a user push rule in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
a50f5f5cb2 push: Add method to get a push rule in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
aa2e905ce3 client-api: Use an enum to construct set_pushrule's Request 2022-11-09 14:45:12 +01:00
Kévin Commaille
f31530e02c client-api: Use an enum for the scope of the push rule endpoints 2022-11-09 14:45:12 +01:00
Kévin Commaille
b2d52680af push: Remove Ruleset::add()
In practice, rule insertion is more complex than
adding rules at the end of the ruleset. It can be
easily replaced by using the methods of IndexSet.
2022-11-09 14:45:12 +01:00
Kévin Commaille
cb122e755c push: Move RuleKind to ruma-common 2022-11-09 14:45:12 +01:00
Kévin Commaille
bf7c504446 push: Add enums for predefined push rule IDs 2022-11-09 14:45:12 +01:00
Kévin Commaille
2bd5c131f4 client-api: Make PusherKind contain the pusher data
Since it depends on the kind
2022-11-07 10:21:48 +01:00
Kévin Commaille
801d9bf212 client-api: Use an enum to differentiate when deleting a pusher 2022-11-07 10:21:48 +01:00
Kévin Commaille
5158dbf2eb events: Don't include sensitive data in Debug-format of to-device events 2022-11-07 09:46:25 +01:00
Jonas Platte
d15fc3f5ec
events: Avoid unnecessary copying in reply generation 2022-11-03 13:45:21 +01:00
Jonas Platte
ae26730e29
events: Move fragment stringification out of HtmlSanitizer::clean 2022-11-03 13:45:16 +01:00
Xiretza
69c807bdc1
events: Escape plain bodies in replies
Replies generate an HTML body even if the reply itself only consists of
plain text. In order to convert the plain text to HTML, it has to be
escaped, which did not happen previously.
2022-11-03 13:16:01 +01:00
Jonas Platte
8d0f817f48
api: Allow incoming request method of HEAD for GET endpoints 2022-11-02 23:26:57 +01:00
Jonas Platte
3eb82950f2
Remove accidentally duplicated file 2022-11-01 12:39:55 +01:00
Jonas Platte
d3a8a8c2e0 client-api: Future-proof Debug implementations of login types
Make sure we don't forget to update them when there are new fields.
2022-11-01 11:13:36 +01:00
Jonas Platte
e271af0140 client-api: Simplify Debug output of uiaa::AuthData 2022-11-01 11:13:36 +01:00
Jonas Platte
c68791a5d8 client-api: Don't include sensitive data in Debug-format of UIAA types 2022-11-01 11:13:36 +01:00
Jonas Platte
2b624c264e client-api: Simplify Debug output for LoginInfo 2022-11-01 11:13:36 +01:00
Jonas Platte
28532f0726 server-util: Upgrade yap 2022-11-01 11:13:21 +01:00
Jonas Platte
d18bea570c Use Cargo workspace dependencies
… for most external dependencies that are used from multiple workspace
crates.
2022-11-01 11:13:21 +01:00
Jonas Platte
4671fa3e4d
api: Properly document request, response macros 2022-11-01 10:04:45 +01:00
Jonas Platte
f613137b31
macros: Add response attribute macro 2022-11-01 09:39:11 +01:00
Jonas Platte
a83a8e7170
appservice: Move msc2409 types from push_events to push_events::v1
… for consistency with other types.
2022-10-31 11:09:47 +01:00
Jonas Platte
452de45c74
ruma: Re-export appservice MSC features
… and test them in CI.
2022-10-31 10:57:20 +01:00
Jonas Platte
0afba1a5d0
appservice-api: Fix push_events test not compiling with unstable features 2022-10-31 10:55:05 +01:00
Jonas Platte
664638299b
appservice-api: Upgrade serde_yaml dev-dependency 2022-10-31 10:52:24 +01:00