Skip to content

Commit

Permalink
derive vc community invitation from general community invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
techsmyth committed Jun 27, 2024
1 parent 05eec5f commit 2260776
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { BaseJourneyEmailPayload } from './base.journey.email.payload';
import { CommunityInvitationCreatedEmailPayload } from './community.invitation.created.email.payload';

export interface CommunityInvitationVirtualContributorCreatedEmailPayload
extends BaseJourneyEmailPayload {
inviter: {
name: string;
firstName: string;
url: string;
};
extends CommunityInvitationCreatedEmailPayload {
virtualContributor: {
name: string;
url: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export class CommunityInvitationVirtualContributorCreatedNotificationBuilder
inviter: {
firstName: inviter.firstName,
name: inviter.profile.displayName,
url: inviter.profile.url,
profile: inviter.profile.url,
email: inviter.email,
},
recipient: {
firstName: recipient.firstName,
Expand All @@ -90,6 +91,8 @@ export class CommunityInvitationVirtualContributorCreatedNotificationBuilder
platform: {
url: eventPayload.platform.url,
},
welcomeMessage: eventPayload.welcomeMessage,
spaceAdminURL: eventPayload.space.adminURL,
};
}
}
4 changes: 4 additions & 0 deletions service/src/templates/community.invitation.created.vc.host.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ module.exports = () => ({
html: `{% extends "src/templates/_layouts/email-transactional.html" %}
{% block content %}Hi {{recipient.firstName}},<br>
<a href="{{inviter.url}}">{{inviter.name}}</a> has invited your Virtual Contributor <a href="{{virtualContributor.url}}">{{virtualContributor.name}}</a> to join <a style="color:#1d384a; text-decoration: none;" href="{{space.url}}">{{space.displayName}}</a>.
<br>
<pre><i>{{welcomeMessage}}</i></pre>
<br>
<a class="action-button" href="{{platform.url}}">Please visit the platform to accept or decline</a><br><br>
{% endblock %}
${templates.footerBlock}`,
},
Expand Down

0 comments on commit 2260776

Please sign in to comment.