mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 23:13:02 +02:00
Toward abstracting Pdu into trait Event.
Co-authored-by: Jade Ellis <jade@ellis.link> Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3d0360bcd6
commit
116f85360f
41 changed files with 842 additions and 886 deletions
|
@ -375,8 +375,6 @@ impl Service {
|
|||
.await
|
||||
.unwrap_or_default();
|
||||
|
||||
let sync_pdu = pdu.to_sync_room_event();
|
||||
|
||||
let mut push_target: HashSet<_> = self
|
||||
.services
|
||||
.state_cache
|
||||
|
@ -401,6 +399,7 @@ impl Service {
|
|||
}
|
||||
}
|
||||
|
||||
let serialized = pdu.to_format();
|
||||
for user in &push_target {
|
||||
let rules_for_user = self
|
||||
.services
|
||||
|
@ -418,7 +417,7 @@ impl Service {
|
|||
for action in self
|
||||
.services
|
||||
.pusher
|
||||
.get_actions(user, &rules_for_user, &power_levels, &sync_pdu, &pdu.room_id)
|
||||
.get_actions(user, &rules_for_user, &power_levels, &serialized, &pdu.room_id)
|
||||
.await
|
||||
{
|
||||
match action {
|
||||
|
@ -768,7 +767,7 @@ impl Service {
|
|||
|
||||
let auth_fetch = |k: &StateEventType, s: &str| {
|
||||
let key = (k.clone(), s.into());
|
||||
ready(auth_events.get(&key))
|
||||
ready(auth_events.get(&key).map(ToOwned::to_owned))
|
||||
};
|
||||
|
||||
let auth_check = state_res::auth_check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue