Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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 }

Expand Down
2 changes: 1 addition & 1 deletion src/experimental_features/enable_features/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/experimental_features/list_features/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/room_membership/join_room/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
5 changes: 2 additions & 3 deletions src/rooms/list_rooms/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -183,7 +182,7 @@ pub struct RoomDetails {
pub public: bool,

/// Join rules of the room.
pub join_rules: Option<SpaceRoomJoinRule>,
pub join_rules: Option<JoinRuleKind>,

/// Guest access of the room
pub guest_access: Option<GuestAccess>,
Expand Down
7 changes: 3 additions & 4 deletions src/rooms/room_details/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand All @@ -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}",
}
};

Expand Down Expand Up @@ -68,7 +67,7 @@ pub struct Response {
pub public: bool,

/// Join rules of the room.
pub join_rules: Option<SpaceRoomJoinRule>,
pub join_rules: Option<JoinRuleKind>,

/// Guest access of the room
pub guest_access: Option<GuestAccess>,
Expand Down
2 changes: 1 addition & 1 deletion src/rooms/room_members/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/create_or_modify/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/deactivate_account/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/get_details/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/is_user_admin/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/list_joined_rooms/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/users/reset_password/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
}
};

Expand Down