mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 00:33:02 +02:00
refactor for ruma identifiers optimizations
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d91570d0e6
commit
0a9b6c136f
19 changed files with 81 additions and 88 deletions
|
@ -4,8 +4,7 @@ use clap::Subcommand;
|
|||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
events::room::message::RoomMessageEventContent, OwnedRoomAliasId, OwnedRoomId, RoomAliasId,
|
||||
RoomId,
|
||||
events::room::message::RoomMessageEventContent, OwnedRoomAliasId, OwnedRoomId, RoomId,
|
||||
};
|
||||
|
||||
use crate::{escape_html, Command};
|
||||
|
@ -58,7 +57,7 @@ pub(super) async fn process(
|
|||
| RoomAliasCommand::Which { ref room_alias_localpart } => {
|
||||
let room_alias_str =
|
||||
format!("#{}:{}", room_alias_localpart, services.globals.server_name());
|
||||
let room_alias = match RoomAliasId::parse_box(room_alias_str) {
|
||||
let room_alias = match OwnedRoomAliasId::parse(room_alias_str) {
|
||||
| Ok(alias) => alias,
|
||||
| Err(err) =>
|
||||
return Ok(RoomMessageEventContent::text_plain(format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue