remove box ids from admin room command arguments

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-04-08 04:39:01 +00:00 committed by Jade Ellis
commit b3e5d2f683
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
20 changed files with 128 additions and 129 deletions

View file

@ -10,7 +10,7 @@ use conduwuit::{
use conduwuit_api::client::{leave_all_rooms, update_avatar_url, update_displayname};
use futures::StreamExt;
use ruma::{
EventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedUserId, RoomId, UserId,
OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedUserId, UserId,
events::{
RoomAccountDataEventType, StateEventType,
room::{
@ -802,7 +802,7 @@ pub(super) async fn make_user_admin(&self, user_id: String) -> Result<RoomMessag
pub(super) async fn put_room_tag(
&self,
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
tag: String,
) -> Result<RoomMessageEventContent> {
let user_id = parse_active_local_user_id(self.services, &user_id).await?;
@ -840,7 +840,7 @@ pub(super) async fn put_room_tag(
pub(super) async fn delete_room_tag(
&self,
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
tag: String,
) -> Result<RoomMessageEventContent> {
let user_id = parse_active_local_user_id(self.services, &user_id).await?;
@ -876,7 +876,7 @@ pub(super) async fn delete_room_tag(
pub(super) async fn get_room_tags(
&self,
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
) -> Result<RoomMessageEventContent> {
let user_id = parse_active_local_user_id(self.services, &user_id).await?;
@ -898,7 +898,7 @@ pub(super) async fn get_room_tags(
#[admin_command]
pub(super) async fn redact_event(
&self,
event_id: Box<EventId>,
event_id: OwnedEventId,
) -> Result<RoomMessageEventContent> {
let Ok(event) = self
.services

View file

@ -2,7 +2,7 @@ mod commands;
use clap::Subcommand;
use conduwuit::Result;
use ruma::{EventId, OwnedRoomOrAliasId, RoomId};
use ruma::{OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId};
use crate::admin_command_dispatch;
@ -102,21 +102,21 @@ pub(super) enum UserCommand {
/// room's internal ID, and the tag name `m.server_notice`.
PutRoomTag {
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
tag: String,
},
/// - Deletes the room tag for the specified user and room ID
DeleteRoomTag {
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
tag: String,
},
/// - Gets all the room tags for the specified user and room ID
GetRoomTags {
user_id: String,
room_id: Box<RoomId>,
room_id: OwnedRoomId,
},
/// - Attempts to forcefully redact the specified event ID from the sender
@ -124,7 +124,7 @@ pub(super) enum UserCommand {
///
/// This is only valid for local users
RedactEvent {
event_id: Box<EventId>,
event_id: OwnedEventId,
},
/// - Force joins a specified list of local users to join the specified