mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 00:31:24 +01:00
add type-safe accessors to account_data service
This commit is contained in:
parent
b82458a460
commit
88ad596e8d
12 changed files with 202 additions and 179 deletions
|
|
@ -773,15 +773,9 @@ impl Service {
|
|||
// Initial account data
|
||||
services().account_data.update_global(
|
||||
&user_id,
|
||||
&ruma::events::GlobalAccountDataEventType::PushRules,
|
||||
&Raw::new(
|
||||
&PushRulesEventContent {
|
||||
global: ruma::push::Ruleset::server_default(
|
||||
&user_id,
|
||||
),
|
||||
}
|
||||
.into(),
|
||||
)
|
||||
&Raw::new(&PushRulesEventContent {
|
||||
global: ruma::push::Ruleset::server_default(&user_id),
|
||||
})
|
||||
.expect("json serialization should always succeed"),
|
||||
)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue