Address review

This commit is contained in:
bxdxnn
2026-06-01 11:22:11 +03:00
committed by GitHub
parent 4c1a167e2b
commit 4b99e5914e
@@ -99,14 +99,6 @@ class DefaultSlashCommandService(
override suspend fun proceedAdmin(
slashCommand: SlashCommand.SlashCommandAdmin,
): Result<Unit> {
if (slashCommand is SlashCommand.ChangeDisplayNameForRoom) {
val canUserChangeDisplayName = withTimeoutOrNull(5.seconds) {
capabilitiesProvider.canChangeDisplayName().getOrNull()
} ?: false
if (!canUserChangeDisplayName) {
return Result.failure(Exception("Changing display name is not allowed"))
}
}
return commandExecutor.proceedAdmin(
slashCommand = slashCommand,
)