mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
refactor: Rename PduBuilder to PartialPdu
This commit is contained in:
@@ -2,7 +2,7 @@ use std::borrow::ToOwned;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Error, Result, debug, debug_info, info, matrix::pdu::PduBuilder, utils, warn,
|
||||
Err, Error, Result, debug, debug_info, info, matrix::pdu::PartialPdu, utils, warn,
|
||||
};
|
||||
use conduwuit_service::Services;
|
||||
use futures::StreamExt;
|
||||
@@ -140,7 +140,7 @@ pub(crate) async fn create_join_event_template_route(
|
||||
.rooms
|
||||
.timeline
|
||||
.create_event(
|
||||
PduBuilder::state(body.user_id.to_string(), &RoomMemberEventContent {
|
||||
PartialPdu::state(body.user_id.to_string(), &RoomMemberEventContent {
|
||||
join_authorized_via_users_server,
|
||||
..RoomMemberEventContent::new(MembershipState::Join)
|
||||
}),
|
||||
@@ -177,7 +177,7 @@ pub(crate) async fn select_authorising_user(
|
||||
.state_accessor
|
||||
.user_can_invite(room_id, user, user_id, state_lock)
|
||||
})
|
||||
.boxed()
|
||||
.boPartialPdu
|
||||
.next()
|
||||
.await
|
||||
.map(ToOwned::to_owned);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use RoomVersionId::*;
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Error, Result, debug_warn, info, matrix::pdu::PduBuilder, utils, warn};
|
||||
use conduwuit::{Err, Error, Result, debug_warn, info, matrix::pdu::PartialPdu, utils, warn};
|
||||
use ruma::{
|
||||
RoomVersionId,
|
||||
api::{client::error::ErrorKind, federation::knock::create_knock_event_template},
|
||||
@@ -103,7 +103,7 @@ pub(crate) async fn create_knock_event_template_route(
|
||||
.rooms
|
||||
.timeline
|
||||
.create_event(
|
||||
PduBuilder::state(
|
||||
PartialPdu::state(
|
||||
body.user_id.to_string(),
|
||||
&RoomMemberEventContent::new(MembershipState::Knock),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use axum::extract::State;
|
||||
use conduwuit::{Err, Result, info, matrix::pdu::PduBuilder, utils};
|
||||
use conduwuit::{Err, Result, info, matrix::pdu::PartialPdu, utils};
|
||||
use ruma::{
|
||||
api::federation::membership::prepare_leave_event,
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
@@ -52,7 +52,7 @@ pub(crate) async fn create_leave_event_template_route(
|
||||
.rooms
|
||||
.timeline
|
||||
.create_event(
|
||||
PduBuilder::state(
|
||||
PartialPdu::state(
|
||||
body.user_id.to_string(),
|
||||
&RoomMemberEventContent::new(MembershipState::Leave),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user