rename conduit to conduwuit finally
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
c6bf8f5ea1
commit
0317cc8cc5
277 changed files with 559 additions and 551 deletions
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "conduit_admin"
|
||||
name = "conduwuit_admin"
|
||||
categories.workspace = true
|
||||
description.workspace = true
|
||||
edition.workspace = true
|
||||
|
@ -27,11 +27,11 @@ release_max_log_level = [
|
|||
|
||||
[dependencies]
|
||||
clap.workspace = true
|
||||
conduit-api.workspace = true
|
||||
conduit-core.workspace = true
|
||||
conduit-database.workspace = true
|
||||
conduit-macros.workspace = true
|
||||
conduit-service.workspace = true
|
||||
conduwuit-api.workspace = true
|
||||
conduwuit-core.workspace = true
|
||||
conduwuit-database.workspace = true
|
||||
conduwuit-macros.workspace = true
|
||||
conduwuit-service.workspace = true
|
||||
const-str.workspace = true
|
||||
futures.workspace = true
|
||||
log.workspace = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Parser;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use crate::{
|
||||
|
@ -9,7 +9,7 @@ use crate::{
|
|||
};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(name = "conduwuit", version = conduit::version())]
|
||||
#[command(name = "conduwuit", version = conduwuit::version())]
|
||||
pub(super) enum AdminCommand {
|
||||
#[command(subcommand)]
|
||||
/// - Commands for managing appservices
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
|
||||
use crate::admin_command_dispatch;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use conduit::Result;
|
||||
use conduit_macros::implement;
|
||||
use conduwuit::Result;
|
||||
use conduwuit_macros::implement;
|
||||
use futures::StreamExt;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use crate::Command;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::time::SystemTime;
|
||||
|
||||
use conduit_service::Services;
|
||||
use conduwuit_service::Services;
|
||||
use ruma::EventId;
|
||||
|
||||
pub(crate) struct Command<'a> {
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
time::{Instant, SystemTime},
|
||||
};
|
||||
|
||||
use conduit::{debug_error, err, info, trace, utils, utils::string::EMPTY, warn, Error, PduEvent, Result};
|
||||
use conduwuit::{debug_error, err, info, trace, utils, utils::string::EMPTY, warn, Error, PduEvent, Result};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::event::get_room_state},
|
||||
|
@ -754,7 +754,7 @@ pub(super) async fn resolve_true_destination(
|
|||
|
||||
#[admin_command]
|
||||
pub(super) async fn memory_stats(&self) -> Result<RoomMessageEventContent> {
|
||||
let html_body = conduit::alloc::memory_stats();
|
||||
let html_body = conduwuit::alloc::memory_stats();
|
||||
|
||||
if html_body.is_none() {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
|
|
|
@ -2,7 +2,7 @@ mod commands;
|
|||
pub(crate) mod tester;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{EventId, OwnedRoomOrAliasId, RoomId, ServerName};
|
||||
|
||||
use self::tester::TesterCommand;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::Err;
|
||||
use conduwuit::Err;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use crate::{admin_command, admin_command_dispatch, Result};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::fmt::Write;
|
||||
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomId, RoomId, ServerName, UserId};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{RoomId, ServerName, UserId};
|
||||
|
||||
use crate::admin_command_dispatch;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use conduit::{debug, debug_info, debug_warn, error, info, trace, utils::time::parse_timepoint_ago, Result};
|
||||
use conduit_service::media::Dim;
|
||||
use conduwuit::{debug, debug_info, debug_warn, error, info, trace, utils::time::parse_timepoint_ago, Result};
|
||||
use conduwuit_service::media::Dim;
|
||||
use ruma::{
|
||||
events::room::message::RoomMessageEventContent, EventId, Mxc, MxcUri, OwnedMxcUri, OwnedServerName, ServerName,
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{EventId, MxcUri, OwnedMxcUri, OwnedServerName, ServerName};
|
||||
|
||||
use crate::admin_command_dispatch;
|
||||
|
|
|
@ -18,12 +18,12 @@ pub(crate) mod room;
|
|||
pub(crate) mod server;
|
||||
pub(crate) mod user;
|
||||
|
||||
extern crate conduit_api as api;
|
||||
extern crate conduit_core as conduit;
|
||||
extern crate conduit_service as service;
|
||||
extern crate conduwuit_api as api;
|
||||
extern crate conduwuit_core as conduwuit;
|
||||
extern crate conduwuit_service as service;
|
||||
|
||||
pub(crate) use conduit::Result;
|
||||
pub(crate) use conduit_macros::{admin_command, admin_command_dispatch};
|
||||
pub(crate) use conduwuit::Result;
|
||||
pub(crate) use conduwuit_macros::{admin_command, admin_command_dispatch};
|
||||
|
||||
pub(crate) use crate::{
|
||||
command::Command,
|
||||
|
@ -32,9 +32,9 @@ pub(crate) use crate::{
|
|||
|
||||
pub(crate) const PAGE_SIZE: usize = 100;
|
||||
|
||||
conduit::mod_ctor! {}
|
||||
conduit::mod_dtor! {}
|
||||
conduit::rustc_flags_capture! {}
|
||||
conduwuit::mod_ctor! {}
|
||||
conduwuit::mod_dtor! {}
|
||||
conduwuit::rustc_flags_capture! {}
|
||||
|
||||
/// Install the admin command processor
|
||||
pub async fn init(admin_service: &service::admin::Service) {
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
};
|
||||
|
||||
use clap::{CommandFactory, Parser};
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
debug, error,
|
||||
log::{
|
||||
capture,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, RoomId, UserId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use crate::Command;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, ServerName};
|
||||
|
||||
use crate::Command;
|
||||
|
|
|
@ -10,7 +10,7 @@ mod sending;
|
|||
mod users;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
|
||||
use self::{
|
||||
account_data::AccountDataCommand, appservice::AppserviceCommand, globals::GlobalsCommand,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, UserId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, UserId};
|
||||
|
||||
use crate::Command;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::fmt::Write;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::{utils::time, Result};
|
||||
use conduwuit::{utils::time, Result};
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedServerName};
|
||||
|
||||
use crate::{admin_command, admin_command_dispatch};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, RoomAliasId, RoomId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, RoomId, ServerName, UserId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, ServerName, UserId};
|
||||
use service::sending::Destination;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::stream::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedDeviceId, OwnedRoomId, OwnedUserId};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::fmt::Write;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomAliasId, OwnedRoomId, RoomAliasId, RoomId};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, RoomId};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use clap::Subcommand;
|
||||
use conduit::{utils::ReadyExt, Result};
|
||||
use conduwuit::{utils::ReadyExt, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, RoomId};
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ mod info;
|
|||
mod moderation;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::OwnedRoomId;
|
||||
|
||||
use self::{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use api::client::leave_room;
|
||||
use clap::Subcommand;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
debug, error, info,
|
||||
utils::{IterStream, ReadyExt},
|
||||
warn, Result,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{fmt::Write, sync::Arc};
|
||||
|
||||
use conduit::{info, utils::time, warn, Err, Result};
|
||||
use conduwuit::{info, utils::time, warn, Err, Result};
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use crate::admin_command;
|
||||
|
@ -73,7 +73,7 @@ pub(super) async fn list_features(
|
|||
pub(super) async fn memory_usage(&self) -> Result<RoomMessageEventContent> {
|
||||
let services_usage = self.services.memory_usage().await?;
|
||||
let database_usage = self.services.db.db.memory_usage()?;
|
||||
let allocator_usage = conduit::alloc::memory_usage().map_or(String::new(), |s| format!("\nAllocator:\n{s}"));
|
||||
let allocator_usage = conduwuit::alloc::memory_usage().map_or(String::new(), |s| format!("\nAllocator:\n{s}"));
|
||||
|
||||
Ok(RoomMessageEventContent::text_plain(format!(
|
||||
"Services:\n{services_usage}\nDatabase:\n{database_usage}{allocator_usage}",
|
||||
|
@ -143,7 +143,7 @@ pub(super) async fn reload_mods(&self) -> Result<RoomMessageEventContent> {
|
|||
#[admin_command]
|
||||
#[cfg(unix)]
|
||||
pub(super) async fn restart(&self, force: bool) -> Result<RoomMessageEventContent> {
|
||||
use conduit::utils::sys::current_exe_deleted;
|
||||
use conduwuit::utils::sys::current_exe_deleted;
|
||||
|
||||
if !force && current_exe_deleted() {
|
||||
return Err!(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
|
||||
use crate::admin_command_dispatch;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use std::{collections::BTreeMap, fmt::Write as _};
|
||||
|
||||
use api::client::{full_user_deactivate, join_room_by_id_helper, leave_room};
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
debug_warn, error, info, is_equal_to,
|
||||
utils::{self, ReadyExt},
|
||||
warn, PduBuilder, Result,
|
||||
};
|
||||
use conduit_api::client::{leave_all_rooms, update_avatar_url, update_displayname};
|
||||
use conduwuit_api::client::{leave_all_rooms, update_avatar_url, update_displayname};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
events::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use ruma::{EventId, OwnedRoomOrAliasId, RoomId};
|
||||
|
||||
use crate::admin_command_dispatch;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use conduit_core::{err, Err, Result};
|
||||
use conduwuit_core::{err, Err, Result};
|
||||
use ruma::{OwnedRoomId, OwnedUserId, RoomId, UserId};
|
||||
use service::Services;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "conduit_api"
|
||||
name = "conduwuit_api"
|
||||
categories.workspace = true
|
||||
description.workspace = true
|
||||
edition.workspace = true
|
||||
|
@ -41,9 +41,9 @@ axum-extra.workspace = true
|
|||
axum.workspace = true
|
||||
base64.workspace = true
|
||||
bytes.workspace = true
|
||||
conduit-core.workspace = true
|
||||
conduit-database.workspace = true
|
||||
conduit-service.workspace = true
|
||||
conduwuit-core.workspace = true
|
||||
conduwuit-database.workspace = true
|
||||
conduwuit-service.workspace = true
|
||||
const-str.workspace = true
|
||||
futures.workspace = true
|
||||
hmac.workspace = true
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::fmt::Write;
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{debug_info, error, info, is_equal_to, utils, utils::ReadyExt, warn, Error, PduBuilder, Result};
|
||||
use conduwuit::{debug_info, error, info, is_equal_to, utils, utils::ReadyExt, warn, Error, PduBuilder, Result};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use register::RegistrationKind;
|
||||
use ruma::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Err};
|
||||
use conduwuit::{err, Err};
|
||||
use ruma::{
|
||||
api::client::config::{
|
||||
get_global_account_data, get_room_account_data, set_global_account_data, set_room_account_data,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{debug, Err, Result};
|
||||
use conduwuit::{debug, Err, Result};
|
||||
use futures::StreamExt;
|
||||
use rand::seq::SliceRandom;
|
||||
use ruma::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Err, Result};
|
||||
use conduwuit::{err, Err, Result};
|
||||
use ruma::api::{appservice::ping, client::appservice::request_ping};
|
||||
|
||||
use crate::Ruma;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Err};
|
||||
use conduwuit::{err, Err};
|
||||
use ruma::{
|
||||
api::client::backup::{
|
||||
add_backup_keys, add_backup_keys_for_room, add_backup_keys_for_session, create_backup_version,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::iter::once;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
at, err, ref_at,
|
||||
utils::{
|
||||
future::TryExtExt,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{err, Err};
|
||||
use conduwuit::{err, Err};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{info, warn, Err, Error, Result};
|
||||
use conduwuit::{info, warn, Err, Error, Result};
|
||||
use futures::{StreamExt, TryFutureExt};
|
||||
use ruma::{
|
||||
api::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::err;
|
||||
use conduwuit::err;
|
||||
use ruma::api::client::filter::{create_filter, get_filter};
|
||||
|
||||
use crate::{Result, Ruma};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, utils, Error, Result};
|
||||
use conduwuit::{err, utils, Error, Result};
|
||||
use futures::{stream::FuturesUnordered, StreamExt};
|
||||
use ruma::{
|
||||
api::{
|
||||
|
|
|
@ -2,12 +2,12 @@ use std::time::Duration;
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
err,
|
||||
utils::{self, content_disposition::make_content_disposition, math::ruma_from_usize},
|
||||
Err, Result,
|
||||
};
|
||||
use conduit_service::{
|
||||
use conduwuit_service::{
|
||||
media::{Dim, FileMeta, CACHE_CONTROL_IMMUTABLE, CORP_CROSS_ORIGIN, MXC_LENGTH},
|
||||
Services,
|
||||
};
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
err,
|
||||
utils::{content_disposition::make_content_disposition, math::ruma_from_usize},
|
||||
Err, Result,
|
||||
};
|
||||
use conduit_service::media::{Dim, FileMeta, CACHE_CONTROL_IMMUTABLE, CORP_CROSS_ORIGIN};
|
||||
use conduwuit_service::media::{Dim, FileMeta, CACHE_CONTROL_IMMUTABLE, CORP_CROSS_ORIGIN};
|
||||
use reqwest::Url;
|
||||
use ruma::{
|
||||
api::client::media::{
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
debug, debug_info, debug_warn, err, error, info,
|
||||
pdu::{self, gen_event_id_canonical_json, PduBuilder},
|
||||
result::FlatOk,
|
||||
|
@ -1457,7 +1457,7 @@ pub async fn leave_all_rooms(services: &Services, user_id: &UserId) {
|
|||
}
|
||||
|
||||
pub async fn leave_room(services: &Services, user_id: &UserId, room_id: &RoomId, reason: Option<String>) -> Result<()> {
|
||||
//use conduit::utils::stream::OptionStream;
|
||||
//use conduwuit::utils::stream::OptionStream;
|
||||
use futures::TryFutureExt;
|
||||
|
||||
// Ask a remote server if we don't have this room
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
at, is_equal_to,
|
||||
utils::{
|
||||
result::{FlatOk, LogErr},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::utils;
|
||||
use conduwuit::utils;
|
||||
use ruma::{
|
||||
api::client::{account, error::ErrorKind},
|
||||
authentication::TokenType,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
pdu::PduBuilder,
|
||||
utils::{stream::TryIgnore, IterStream},
|
||||
warn, Err, Error, Result,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Err};
|
||||
use conduwuit::{err, Err};
|
||||
use ruma::{
|
||||
api::client::{
|
||||
error::ErrorKind,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, Err, PduCount};
|
||||
use conduwuit::{err, Err, PduCount};
|
||||
use ruma::{
|
||||
api::client::{read_marker::set_read_marker, receipt::create_receipt},
|
||||
events::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
at,
|
||||
utils::{result::FlatOk, stream::WidebandExt, IterStream, ReadyExt},
|
||||
PduCount, Result,
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::time::Duration;
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{info, utils::ReadyExt, Err};
|
||||
use conduwuit::{info, utils::ReadyExt, Err};
|
||||
use rand::Rng;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{Error, Result};
|
||||
use conduwuit::{Error, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::api::client::{error::ErrorKind, room::aliases};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{debug_info, debug_warn, error, info, pdu::PduBuilder, warn, Err, Error, Result};
|
||||
use conduwuit::{debug_info, debug_warn, error, info, pdu::PduBuilder, warn, Err, Error, Result};
|
||||
use futures::FutureExt;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Err, Event, Result};
|
||||
use conduwuit::{err, Err, Event, Result};
|
||||
use futures::{try_join, FutureExt, TryFutureExt};
|
||||
use ruma::api::client::room::get_room_event;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{at, utils::BoolExt, Err, Result};
|
||||
use conduwuit::{at, utils::BoolExt, Err, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::api::client::room::initial_sync::v3::{PaginationChunk, Request, Response};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::cmp::max;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, info, pdu::PduBuilder, Error, Result};
|
||||
use conduwuit::{err, info, pdu::PduBuilder, Error, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::client::{error::ErrorKind, room::upgrade_room},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
at, is_true,
|
||||
result::FlatOk,
|
||||
utils::{stream::ReadyExt, IterStream},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, Err};
|
||||
use conduwuit::{err, Err};
|
||||
use ruma::{api::client::message::send_message_event, events::MessageLikeEventType};
|
||||
use serde_json::from_str;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{debug, err, info, utils::ReadyExt, warn, Err};
|
||||
use conduwuit::{debug, err, info, utils::ReadyExt, warn, Err};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, pdu::PduBuilder, utils::BoolExt, Err, Error, PduEvent, Result};
|
||||
use conduwuit::{err, pdu::PduBuilder, utils::BoolExt, Err, Error, PduEvent, Result};
|
||||
use ruma::{
|
||||
api::client::{
|
||||
error::ErrorKind,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod v3;
|
||||
mod v4;
|
||||
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
utils::stream::{BroadbandExt, ReadyExt},
|
||||
PduCount,
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
at, err, error, extract_variant, is_equal_to, is_false,
|
||||
pdu::EventHash,
|
||||
result::{FlatOk, LogDebugErr},
|
||||
|
@ -18,7 +18,7 @@ use conduit::{
|
|||
},
|
||||
Error, PduCount, PduEvent, Result,
|
||||
};
|
||||
use conduit_service::{
|
||||
use conduwuit_service::{
|
||||
rooms::short::{ShortStateHash, ShortStateKey},
|
||||
Services,
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
debug, error, extract_variant,
|
||||
utils::{
|
||||
math::{ruma_from_usize, usize_from_ruma, usize_from_u64_truncated},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{at, PduCount, PduEvent};
|
||||
use conduwuit::{at, PduCount, PduEvent};
|
||||
use futures::StreamExt;
|
||||
use ruma::{api::client::threads::get_threads, uint};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{Error, Result};
|
||||
use conduwuit::{Error, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::collections::BTreeMap;
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::Err;
|
||||
use conduwuit::Err;
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{
|
||||
|
|
|
@ -64,8 +64,8 @@ pub(crate) async fn get_supported_versions_route(
|
|||
/// `/_matrix/federation/v1/version`
|
||||
pub(crate) async fn conduwuit_server_version() -> Result<impl IntoResponse> {
|
||||
Ok(Json(serde_json::json!({
|
||||
"name": conduit::version::name(),
|
||||
"version": conduit::version::version(),
|
||||
"name": conduwuit::version::name(),
|
||||
"version": conduwuit::version::version(),
|
||||
})))
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::utils::TryFutureExtExt;
|
||||
use conduwuit::utils::TryFutureExtExt;
|
||||
use futures::{pin_mut, StreamExt};
|
||||
use ruma::{
|
||||
api::client::user_directory::search_users,
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::time::{Duration, SystemTime};
|
|||
|
||||
use axum::extract::State;
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
use conduit::{utils, Err};
|
||||
use conduwuit::{utils, Err};
|
||||
use hmac::{Hmac, Mac};
|
||||
use ruma::{api::client::voip::get_turn_server_info, SecondsSinceUnixEpoch, UserId};
|
||||
use sha1::Sha1;
|
||||
|
|
|
@ -100,6 +100,6 @@ pub(crate) async fn syncv3_client_server_json(State(services): State<crate::Stat
|
|||
|
||||
Ok(Json(serde_json::json!({
|
||||
"server": server_url,
|
||||
"version": conduit::version(),
|
||||
"version": conduwuit::version(),
|
||||
})))
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@ pub mod client;
|
|||
pub mod router;
|
||||
pub mod server;
|
||||
|
||||
extern crate conduit_core as conduit;
|
||||
extern crate conduit_service as service;
|
||||
extern crate conduwuit_core as conduwuit;
|
||||
extern crate conduwuit_service as service;
|
||||
|
||||
pub(crate) use conduit::{debug_info, pdu::PduEvent, utils, Error, Result};
|
||||
pub(crate) use conduwuit::{debug_info, pdu::PduEvent, utils, Error, Result};
|
||||
|
||||
pub(crate) use self::router::{Ruma, RumaResponse, State};
|
||||
|
||||
conduit::mod_ctor! {}
|
||||
conduit::mod_dtor! {}
|
||||
conduwuit::mod_ctor! {}
|
||||
conduwuit::mod_dtor! {}
|
||||
|
|
|
@ -12,7 +12,7 @@ use axum::{
|
|||
routing::{any, get, post},
|
||||
Router,
|
||||
};
|
||||
use conduit::{err, Server};
|
||||
use conduwuit::{err, Server};
|
||||
use http::{uri, Uri};
|
||||
|
||||
use self::handler::RouterExt;
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{mem, ops::Deref};
|
|||
|
||||
use axum::{async_trait, body::Body, extract::FromRequest};
|
||||
use bytes::{BufMut, Bytes, BytesMut};
|
||||
use conduit::{debug, debug_warn, err, trace, utils::string::EMPTY, Error, Result};
|
||||
use conduwuit::{debug, debug_warn, err, trace, utils::string::EMPTY, Error, Result};
|
||||
use ruma::{
|
||||
api::IncomingRequest, CanonicalJsonObject, CanonicalJsonValue, DeviceId, OwnedDeviceId, OwnedServerName,
|
||||
OwnedUserId, ServerName, UserId,
|
||||
|
|
|
@ -4,7 +4,7 @@ use axum_extra::{
|
|||
typed_header::TypedHeaderRejectionReason,
|
||||
TypedHeader,
|
||||
};
|
||||
use conduit::{debug_error, err, warn, Err, Error, Result};
|
||||
use conduwuit::{debug_error, err, warn, Err, Error, Result};
|
||||
use ruma::{
|
||||
api::{
|
||||
client::{
|
||||
|
|
|
@ -4,7 +4,7 @@ use axum::{
|
|||
routing::{on, MethodFilter},
|
||||
Router,
|
||||
};
|
||||
use conduit::Result;
|
||||
use conduwuit::Result;
|
||||
use futures::{Future, TryFutureExt};
|
||||
use http::Method;
|
||||
use ruma::api::IncomingRequest;
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::str;
|
|||
|
||||
use axum::{extract::Path, RequestExt, RequestPartsExt};
|
||||
use bytes::Bytes;
|
||||
use conduit::{err, Result};
|
||||
use conduwuit::{err, Result};
|
||||
use http::request::Parts;
|
||||
use serde::Deserialize;
|
||||
use service::Services;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::response::{IntoResponse, Response};
|
||||
use bytes::BytesMut;
|
||||
use conduit::{error, Error};
|
||||
use conduwuit::{error, Error};
|
||||
use http::StatusCode;
|
||||
use http_body_util::Full;
|
||||
use ruma::api::{client::uiaa::UiaaResponse, OutgoingResponse};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{ops::Deref, sync::Arc};
|
||||
|
||||
use conduit_service::Services;
|
||||
use conduwuit_service::Services;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct State {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::cmp;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
utils::{IterStream, ReadyExt},
|
||||
PduCount, Result,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, Result};
|
||||
use conduwuit::{err, Result};
|
||||
use ruma::{api::federation::event::get_event, MilliSecondsSinceUnixEpoch, RoomId};
|
||||
|
||||
use super::AccessCheck;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::{borrow::Borrow, iter::once};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{Error, Result};
|
||||
use conduwuit::{Error, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::authorization::get_event_authorization},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{Error, Result};
|
||||
use conduwuit::{Error, Result};
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::event::get_missing_events},
|
||||
CanonicalJsonValue, EventId, RoomId,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
use conduit::{err, utils, utils::hash::sha256, warn, Err, Error, PduEvent, Result};
|
||||
use conduwuit::{err, utils, utils::hash::sha256, warn, Err, Error, PduEvent, Result};
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::membership::create_invite},
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::{
|
|||
};
|
||||
|
||||
use axum::{extract::State, response::IntoResponse, Json};
|
||||
use conduit::{utils::timepoint_from_now, Result};
|
||||
use conduwuit::{utils::timepoint_from_now, Result};
|
||||
use ruma::{
|
||||
api::{
|
||||
federation::discovery::{get_server_keys, OldVerifyKey, ServerSigningKeys},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{debug_info, utils::IterStream, warn, Err};
|
||||
use conduwuit::{debug_info, utils::IterStream, warn, Err};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::membership::prepare_join_event},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::Err;
|
||||
use conduwuit::Err;
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::knock::create_knock_event_template},
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{Err, Result};
|
||||
use conduwuit::{Err, Result};
|
||||
use ruma::{
|
||||
api::federation::membership::prepare_leave_event,
|
||||
events::room::member::{MembershipState, RoomMemberEventContent},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{utils::content_disposition::make_content_disposition, Err, Result};
|
||||
use conduit_service::media::{Dim, FileMeta};
|
||||
use conduwuit::{utils::content_disposition::make_content_disposition, Err, Result};
|
||||
use conduwuit_service::media::{Dim, FileMeta};
|
||||
use ruma::{
|
||||
api::federation::authenticated_media::{
|
||||
get_content, get_content_thumbnail, Content, ContentMetadata, FileOrLocation,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, Error, Result};
|
||||
use conduwuit::{err, Error, Result};
|
||||
use futures::StreamExt;
|
||||
use get_profile_information::v1::ProfileField;
|
||||
use rand::seq::SliceRandom;
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{collections::BTreeMap, net::IpAddr, time::Instant};
|
|||
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::{debug, debug_warn, err, error, result::LogErr, trace, utils::ReadyExt, warn, Err, Error, Result};
|
||||
use conduwuit::{debug, debug_warn, err, error, result::LogErr, trace, utils::ReadyExt, warn, Err, Error, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::{
|
||||
api::{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use std::{borrow::Borrow, collections::HashMap};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{
|
||||
use conduwuit::{
|
||||
err,
|
||||
pdu::gen_event_id_canonical_json,
|
||||
utils::stream::{IterStream, TryBroadbandExt},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use conduit::{err, pdu::gen_event_id_canonical_json, warn, Err, Error, PduEvent, Result};
|
||||
use conduwuit::{err, pdu::gen_event_id_canonical_json, warn, Err, Error, PduEvent, Result};
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation::knock::send_knock},
|
||||
events::{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#![allow(deprecated)]
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, Err, Result};
|
||||
use conduwuit::{err, Err, Result};
|
||||
use ruma::{
|
||||
api::federation::membership::create_leave_event,
|
||||
events::{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue