feat: Add a webpage for threepid validation links

This commit is contained in:
Ginger
2026-03-22 19:34:13 -04:00
committed by Ellis Git
parent 9d06208a7a
commit f2b7dd6519
14 changed files with 68 additions and 21 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ impl Service {
/// if they were not.
pub async fn empower_first_user(&self, user: &UserId) -> Result<bool> {
#[derive(Template)]
#[template(path = "welcome.md.j2")]
#[template(path = "welcome.md")]
struct WelcomeMessage<'a> {
config: &'a Dep<config::Service>,
domain: &'a str,
+4 -4
View File
@@ -6,7 +6,7 @@ pub trait MessageTemplate: Template {
}
#[derive(Template)]
#[template(path = "mail/change_email.txt.j2")]
#[template(path = "mail/change_email.txt")]
pub struct ChangeEmail<'a> {
pub user_id: &'a UserId,
pub verification_link: String,
@@ -17,7 +17,7 @@ impl MessageTemplate for ChangeEmail<'_> {
}
#[derive(Template)]
#[template(path = "mail/new_account.txt.j2")]
#[template(path = "mail/new_account.txt")]
pub struct NewAccount<'a> {
pub server_name: &'a str,
pub verification_link: String,
@@ -28,7 +28,7 @@ impl MessageTemplate for NewAccount<'_> {
}
#[derive(Template)]
#[template(path = "mail/password_reset.txt.j2")]
#[template(path = "mail/password_reset.txt")]
pub struct PasswordReset<'a> {
pub display_name: Option<&'a str>,
pub user_id: &'a UserId,
@@ -40,7 +40,7 @@ impl MessageTemplate for PasswordReset<'_> {
}
#[derive(Template)]
#[template(path = "mail/test.txt.j2")]
#[template(path = "mail/test.txt")]
pub struct Test;
impl MessageTemplate for Test {
@@ -1,4 +1,4 @@
{% extends "_base.txt.j2" %}
{% extends "_base.txt" %}
{% block content -%}
Hello!
@@ -1,4 +1,4 @@
{% extends "_base.txt.j2" %}
{% extends "_base.txt" %}
{% block content -%}
Hello!
@@ -1,4 +1,4 @@
{% extends "_base.txt.j2" %}
{% extends "_base.txt" %}
{% block content -%}
{%- if let Some(display_name) = display_name -%}
@@ -1,4 +1,4 @@
{% extends "_base.txt.j2" %}
{% extends "_base.txt" %}
{% block content -%}
If you're seeing this, SMTP is configured correctly. :3