diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76fa246..a939442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI env: CARGO_TERM_COLOR: always CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse - NIGHTLY: nightly-2025-03-03 + NIGHTLY: nightly-2025-08-08 on: push: @@ -27,7 +27,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Check spelling - uses: crate-ci/typos@v1.30.0 + uses: crate-ci/typos@v1.36.0 - name: Install cargo-sort uses: taiki-e/cache-cargo-install-action@v2 @@ -49,14 +49,14 @@ jobs: - name: Install MSRV toolchain uses: dtolnay/rust-toolchain@master with: - toolchain: "1.81" + toolchain: "1.82" - uses: Swatinem/rust-cache@v2 with: # A stable compiler update should automatically not reuse old caches. # Add the MSRV as a stable cache key too so bumping it also gets us a # fresh cache. - shared-key: msrv1.81 + shared-key: msrv1.82 - name: Run checks run: cargo check --all-features diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index a98b7aa..f93c6f0 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -5,9 +5,6 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse on: - schedule: - # every monday at 4AM (UTC?) - - cron: '0 4 * * 1' push: branches: [main] pull_request: @@ -17,7 +14,6 @@ jobs: bans-licenses-sources: name: Bans, Licenses, Sources runs-on: ubuntu-latest - if: github.event.name != 'schedule' steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b3868..71b8ae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Breaking changes: them as if they were exhaustive, use the `ruma_unstable_exhaustive_types` compile-time `cfg` setting. * Changed `users::create_or_modify::v2` third party id parsing by adding a new type without `validated_at` and `added_at` fields (which are not sent according to the API documentation) +* Upgrade ruma to 0.13.0 Improvement: diff --git a/Cargo.toml b/Cargo.toml index 45696d8..98a2969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["matrix", "chat", "messaging", "ruma"] license = "MIT" repository = "https://github.com/ruma/synapse-admin-api" edition = "2018" -rust-version = "1.81" +rust-version = "1.82" [features] client = [] @@ -19,7 +19,7 @@ shared-secret-registration-mac = ["dep:hex", "dep:hmac", "dep:sha1"] [dependencies] hex = { version = "0.4.3", optional = true } hmac = { version = "0.12.1", optional = true } -ruma = { version = "0.12.0", features = ["api", "events"] } +ruma = { version = "0.13.0", features = ["api", "events"] } serde = { version = "1.0.118", features = ["derive"] } sha1 = { version = "0.10.1", optional = true } diff --git a/src/experimental_features/enable_features/v1.rs b/src/experimental_features/enable_features/v1.rs index 96c331e..c77420f 100644 --- a/src/experimental_features/enable_features/v1.rs +++ b/src/experimental_features/enable_features/v1.rs @@ -11,7 +11,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/experimental_features/:user_id", + unstable => "/_synapse/admin/v1/experimental_features/{user_id}", } }; diff --git a/src/experimental_features/list_features/v1.rs b/src/experimental_features/list_features/v1.rs index e71ab0e..2adefd4 100644 --- a/src/experimental_features/list_features/v1.rs +++ b/src/experimental_features/list_features/v1.rs @@ -13,7 +13,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/experimental_features/:user_id", + unstable => "/_synapse/admin/v1/experimental_features/{user_id}", } }; diff --git a/src/room_membership/join_room/v1.rs b/src/room_membership/join_room/v1.rs index 6976bef..f2150c6 100644 --- a/src/room_membership/join_room/v1.rs +++ b/src/room_membership/join_room/v1.rs @@ -10,7 +10,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/join/:room_id_or_alias", + unstable => "/_synapse/admin/v1/join/{room_id_or_alias}", } }; diff --git a/src/rooms/list_rooms/v1.rs b/src/rooms/list_rooms/v1.rs index 5ccc3f0..d5e43e2 100644 --- a/src/rooms/list_rooms/v1.rs +++ b/src/rooms/list_rooms/v1.rs @@ -2,9 +2,8 @@ use ruma::{ api::{metadata, request, response, Metadata}, events::room::{guest_access::GuestAccess, history_visibility::HistoryVisibility}, - room::RoomType, + room::{JoinRuleKind, RoomType}, serde::{OrdAsRefStr, PartialEqAsRefStr, PartialOrdAsRefStr, StringEnum}, - space::SpaceRoomJoinRule, uint, OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UInt, }; use serde::{Deserialize, Serialize}; @@ -183,7 +182,7 @@ pub struct RoomDetails { pub public: bool, /// Join rules of the room. - pub join_rules: Option, + pub join_rules: Option, /// Guest access of the room pub guest_access: Option, diff --git a/src/rooms/room_details/v1.rs b/src/rooms/room_details/v1.rs index 946de82..fa6f2f2 100644 --- a/src/rooms/room_details/v1.rs +++ b/src/rooms/room_details/v1.rs @@ -2,8 +2,7 @@ use ruma::{ api::{metadata, request, response, Metadata}, events::room::{guest_access::GuestAccess, history_visibility::HistoryVisibility}, - room::RoomType, - space::SpaceRoomJoinRule, + room::{JoinRuleKind, RoomType}, uint, OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UInt, }; @@ -12,7 +11,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/rooms/:room_id", + unstable => "/_synapse/admin/v1/rooms/{room_id}", } }; @@ -68,7 +67,7 @@ pub struct Response { pub public: bool, /// Join rules of the room. - pub join_rules: Option, + pub join_rules: Option, /// Guest access of the room pub guest_access: Option, diff --git a/src/rooms/room_members/v1.rs b/src/rooms/room_members/v1.rs index 364a986..2a5523d 100644 --- a/src/rooms/room_members/v1.rs +++ b/src/rooms/room_members/v1.rs @@ -9,7 +9,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/rooms/:room_id/members", + unstable => "/_synapse/admin/v1/rooms/{room_id}/members", } }; diff --git a/src/users/create_or_modify/v2.rs b/src/users/create_or_modify/v2.rs index 63af2fb..6d292ec 100644 --- a/src/users/create_or_modify/v2.rs +++ b/src/users/create_or_modify/v2.rs @@ -14,7 +14,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v2/users/:user_id", + unstable => "/_synapse/admin/v2/users/{user_id}", } }; diff --git a/src/users/deactivate_account/v1.rs b/src/users/deactivate_account/v1.rs index 31bae2a..31c7cb3 100644 --- a/src/users/deactivate_account/v1.rs +++ b/src/users/deactivate_account/v1.rs @@ -10,7 +10,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/deactivate/:user_id", + unstable => "/_synapse/admin/v1/deactivate/{user_id}", } }; diff --git a/src/users/get_details/v2.rs b/src/users/get_details/v2.rs index 0d42777..a252d26 100644 --- a/src/users/get_details/v2.rs +++ b/src/users/get_details/v2.rs @@ -12,7 +12,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v2/users/:user_id", + unstable => "/_synapse/admin/v2/users/{user_id}", } }; diff --git a/src/users/is_user_admin/v1.rs b/src/users/is_user_admin/v1.rs index 4ae98b9..ef9da65 100644 --- a/src/users/is_user_admin/v1.rs +++ b/src/users/is_user_admin/v1.rs @@ -10,7 +10,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/users/:user_id/admin", + unstable => "/_synapse/admin/v1/users/{user_id}/admin", } }; diff --git a/src/users/list_joined_rooms/v1.rs b/src/users/list_joined_rooms/v1.rs index 3e7e59c..5d9c5cc 100644 --- a/src/users/list_joined_rooms/v1.rs +++ b/src/users/list_joined_rooms/v1.rs @@ -10,7 +10,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/users/:user_id/joined_rooms", + unstable => "/_synapse/admin/v1/users/{user_id}/joined_rooms", } }; diff --git a/src/users/reset_password/v1.rs b/src/users/reset_password/v1.rs index 4906360..b887906 100644 --- a/src/users/reset_password/v1.rs +++ b/src/users/reset_password/v1.rs @@ -10,7 +10,7 @@ const METADATA: Metadata = metadata! { rate_limited: false, authentication: AccessToken, history: { - unstable => "/_synapse/admin/v1/reset_password/:user_id", + unstable => "/_synapse/admin/v1/reset_password/{user_id}", } };