Add support for 3PID notification for Matrix ID room invites
- Experimental feature - Via AS API
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* mxisd - Matrix Identity Server Daemon
|
||||
* Copyright (C) 2017 Maxime Dor
|
||||
* Copyright (C) 2017 Kamax Sarl
|
||||
*
|
||||
* https://max.kamax.io/
|
||||
* https://www.kamax.io/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -28,6 +28,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties("notification.handlers.sendgrid")
|
||||
@@ -142,6 +144,15 @@ public class EmailSendGridConfig {
|
||||
|
||||
private EmailTemplate invite = new EmailTemplate();
|
||||
private TemplateSession session = new TemplateSession();
|
||||
private Map<String, EmailTemplate> generic = new HashMap<>();
|
||||
|
||||
public Map<String, EmailTemplate> getGeneric() {
|
||||
return generic;
|
||||
}
|
||||
|
||||
public void setGeneric(Map<String, EmailTemplate> generic) {
|
||||
this.generic = generic;
|
||||
}
|
||||
|
||||
public EmailTemplate getInvite() {
|
||||
return invite;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* mxisd - Matrix Identity Server Daemon
|
||||
* Copyright (C) 2017 Maxime Dor
|
||||
* Copyright (C) 2017 Kamax Sarl
|
||||
*
|
||||
* https://max.kamax.io/
|
||||
* https://www.kamax.io/
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -22,6 +22,9 @@ package io.kamax.mxisd.config.threepid.medium;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GenericTemplateConfig {
|
||||
|
||||
private static final String classpathPrefix = "classpath:";
|
||||
@@ -73,6 +76,7 @@ public class GenericTemplateConfig {
|
||||
|
||||
private String invite;
|
||||
private Session session = new Session();
|
||||
private Map<String, String> generic = new HashMap<>();
|
||||
|
||||
public String getInvite() {
|
||||
return invite;
|
||||
@@ -86,4 +90,12 @@ public class GenericTemplateConfig {
|
||||
return session;
|
||||
}
|
||||
|
||||
public Map<String, String> getGeneric() {
|
||||
return generic;
|
||||
}
|
||||
|
||||
public void setGeneric(Map<String, String> generic) {
|
||||
this.generic = generic;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user