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.

change invite formatting and rate limit (#4542)

Sean Aye3653da2e2ffb
diff --git a/.gitignore b/.gitignore
index f79c1e3df8..719b7eae49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ run-local.fish
.pi/plans/
# Per-instance generated local-stack artifacts (compose override, env, kickstart, Caddyfile).
infra/local/generated/
+**/target/*
diff --git a/rust/cloud-storage/invite_email/src/lib.rs b/rust/cloud-storage/invite_email/src/lib.rs
index 3ae4fce79f..4ba30fc722 100644
--- a/rust/cloud-storage/invite_email/src/lib.rs
+++ b/rust/cloud-storage/invite_email/src/lib.rs
@@ -293,7 +293,7 @@ impl NotificationExtEmail for InviteToTeamMetadata {
EmailContent {
subject: format!(
"{} has invited you to the {} team on Macro",
- self.invited_by.as_ref(),
+ self.invited_by.email_part().as_ref(),
self.team_name
),
body: self
@@ -303,10 +303,10 @@ impl NotificationExtEmail for InviteToTeamMetadata {
}
fn rate_limit_config() -> RateLimitConfig {
- const HOURS_PER_WEEK: u64 = 24 * 7;
+ const TWO_DAYS: u64 = 24 * 2;
RateLimitConfig {
max_count: 1,
- window: Duration::from_hours(HOURS_PER_WEEK),
+ window: Duration::from_hours(TWO_DAYS),
}
}
diff --git a/rust/cloud-storage/invite_email/templates/invite_to_team.html b/rust/cloud-storage/invite_email/templates/invite_to_team.html
index ce944cec51..40b5cb58a3 100644
--- a/rust/cloud-storage/invite_email/templates/invite_to_team.html
+++ b/rust/cloud-storage/invite_email/templates/invite_to_team.html
@@ -131,15 +131,7 @@
</td>
{% endif %}
<td style="vertical-align: middle; line-height: 1.2">
- <span
- style="
- color: #626262;
- font-family:
- &quot;Berkeley Mono&quot;, &quot;Courier New&quot;,
- Courier, monospace;
- "
- >{{ invited_by }}</span
- > has invited you to the <strong>{{ team_name }}</strong> team
+ {{ invited_by.email_part().as_ref() }} has invited you to the <strong>{{ team_name }}</strong> team
</td>
</tr>
</tbody>