Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(teams): shorten the auto-join generic domain error so the toast fits (#7650)

Will Hutchinson027569918751
diff --git a/apps/web/src/lib/service-clients/service-auth/client.ts b/apps/web/src/lib/service-clients/service-auth/client.ts
index d51f9da6b5..edbf4283bb 100644
--- a/apps/web/src/lib/service-clients/service-auth/client.ts
+++ b/apps/web/src/lib/service-clients/service-auth/client.ts
@@ -1139,7 +1139,7 @@ export const authServiceClient = {
message:
typeof message === 'string'
? message
- : 'This domain cannot be used for auto-join',
+ : "Auto-join isn't available for this domain",
};
}
return {
diff --git a/crates/teams/src/domain/model.rs b/crates/teams/src/domain/model.rs
index b47de0a1aa..10e3974acd 100644
--- a/crates/teams/src/domain/model.rs
+++ b/crates/teams/src/domain/model.rs
@@ -827,7 +827,7 @@ pub enum JoinTeamError {
#[derive(Debug, thiserror::Error)]
pub enum ToggleAutoJoinDomainError {
/// The team owner's email domain is a generic email provider domain
- #[error("The domain {0} is a generic email domain and cannot be used for auto-join")]
+ #[error("Auto-join isn't available for {0}")]
GenericDomainNotAllowed(String),
/// Underlying team error
#[error("Underlying team error {0}")]
diff --git a/crates/teams/src/inbound/axum_router/test.rs b/crates/teams/src/inbound/axum_router/test.rs
index 7056293a4d..ede986c638 100644
--- a/crates/teams/src/inbound/axum_router/test.rs
+++ b/crates/teams/src/inbound/axum_router/test.rs
@@ -194,7 +194,10 @@ async fn toggle_auto_join_domain_generic_domain_response_is_bad_request() {
.await;
assert_eq!(status, StatusCode::BAD_REQUEST);
- assert!(body_text.contains("gmail.com"));
+ assert_eq!(
+ body_text,
+ r#"{"message":"Auto-join isn't available for gmail.com"}"#
+ );
}
#[tokio::test]