mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-09 16:06:41 +02:00
service/admin: use &RoomId instead of &OwnedRoomId
This is like &str vs &String.
This commit is contained in:
parent
99d98efeb1
commit
2e2b3793ca
1 changed files with 3 additions and 3 deletions
|
@ -158,7 +158,7 @@ impl Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_event(&self, event: AdminRoomEvent, admin_room: &OwnedRoomId, server_user: &UserId) -> Result<()> {
|
async fn handle_event(&self, event: AdminRoomEvent, admin_room: &RoomId, server_user: &UserId) -> Result<()> {
|
||||||
let (mut message_content, reply) = match event {
|
let (mut message_content, reply) = match event {
|
||||||
AdminRoomEvent::SendMessage(content) => (content, None),
|
AdminRoomEvent::SendMessage(content) => (content, None),
|
||||||
AdminRoomEvent::ProcessMessage(room_message, reply_id) => {
|
AdminRoomEvent::ProcessMessage(room_message, reply_id) => {
|
||||||
|
@ -172,7 +172,7 @@ impl Service {
|
||||||
.roomid_mutex_state
|
.roomid_mutex_state
|
||||||
.write()
|
.write()
|
||||||
.await
|
.await
|
||||||
.entry(admin_room.clone())
|
.entry(admin_room.to_owned())
|
||||||
.or_default(),
|
.or_default(),
|
||||||
);
|
);
|
||||||
let state_lock = mutex_state.lock().await;
|
let state_lock = mutex_state.lock().await;
|
||||||
|
@ -207,7 +207,7 @@ impl Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_response_error(
|
async fn handle_response_error(
|
||||||
&self, e: &Error, admin_room: &OwnedRoomId, server_user: &UserId, state_lock: &MutexGuard<'_, ()>,
|
&self, e: &Error, admin_room: &RoomId, server_user: &UserId, state_lock: &MutexGuard<'_, ()>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
error!("Failed to build and append admin room response PDU: \"{e}\"");
|
error!("Failed to build and append admin room response PDU: \"{e}\"");
|
||||||
let error_room_message = RoomMessageEventContent::text_plain(format!(
|
let error_room_message = RoomMessageEventContent::text_plain(format!(
|
||||||
|
|
Loading…
Add table
Reference in a new issue