diff --git a/application.example.yaml b/application.example.yaml index 0db19e2..67d8e3e 100644 --- a/application.example.yaml +++ b/application.example.yaml @@ -252,6 +252,8 @@ invite: # - %SENDER_ID% Matrix ID of the invitation sender # - %SENDER_NAME% Display name of the invitation sender, empty if not available # - %SENDER_NAME_OR_ID% Value of %SENDER_NAME% or, if empty, value of %SENDER_ID% + # - %INVITE_MEDIUM% Medium of the invite (e.g. email, msisdn) + # - %INVITE_ADDRESS% Address used to invite # - %ROOM_ID% ID of the room where the invitation took place # - %ROOM_NAME% Name of the room, empty if not available # - %ROOM_NAME_OR_ID% Value of %ROOM_NAME% or, if empty, value of %ROOM_ID% diff --git a/src/main/groovy/io/kamax/mxisd/invitation/sender/EmailInviteSender.java b/src/main/groovy/io/kamax/mxisd/invitation/sender/EmailInviteSender.java index fff553b..854c783 100644 --- a/src/main/groovy/io/kamax/mxisd/invitation/sender/EmailInviteSender.java +++ b/src/main/groovy/io/kamax/mxisd/invitation/sender/EmailInviteSender.java @@ -104,6 +104,8 @@ public class EmailInviteSender implements IInviteSender { templateBody = templateBody.replace("%SENDER_ID%", invite.getInvite().getSender().getId()); templateBody = templateBody.replace("%SENDER_NAME%", senderName); templateBody = templateBody.replace("%SENDER_NAME_OR_ID%", senderNameOrId); + templateBody = templateBody.replace("%INVITE_MEDIUM%", invite.getInvite().getMedium()); + templateBody = templateBody.replace("%INVITE_ADDRESS%", invite.getInvite().getAddress()); templateBody = templateBody.replace("%ROOM_ID%", invite.getInvite().getRoomId()); templateBody = templateBody.replace("%ROOM_NAME%", roomName); templateBody = templateBody.replace("%ROOM_NAME_OR_ID%", roomNameOrId); diff --git a/src/main/resources/email/invite-template.eml b/src/main/resources/email/invite-template.eml index 0d85320..c422476 100644 --- a/src/main/resources/email/invite-template.eml +++ b/src/main/resources/email/invite-template.eml @@ -12,6 +12,9 @@ Hi, %SENDER_NAME_OR_ID% has invited you into a room [%ROOM_NAME_OR_ID%] on Matrix. To join the conversation, register an account on http://%DOMAIN% +You can also register an account on a public server, like Matrix.org, by going to +https://riot.im/app/#/register?%INVITE_MEDIUM%=%INVITE_ADDRESS% + About Matrix: @@ -69,6 +72,9 @@ pre, code {
%SENDER_NAME_OR_ID% has invited you into a room [%ROOM_NAME_OR_ID%] on Matrix. To join the conversation, register an account on %DOMAIN%.
+You can also register an account on a public server, like Matrix.org, by following +this link.
+About Matrix: