deal with invites to existing users

This commit is contained in:
Seth Call 2020-04-04 19:31:00 -05:00
parent 0294761079
commit ddb5ba42fa
2 changed files with 20 additions and 7 deletions

View File

@ -40,6 +40,7 @@ module JamRuby
@signup_url = generate_signup_url(invited_user)
@sender = invited_user.sender
@note = invited_user.note
@receiver = invited_user.receiver
@suppress_user_has_account_footer = true
sendgrid_category "Invitation"
sendgrid_unique_args :type => "friend_invitation"

View File

@ -1,12 +1,24 @@
<% provide(:title, "You've been invited to JamKazam by #{@sender.name}!") %>
<% provide(:title, @receiver ? "#{@sender.name} would like you to be their friend on JamKazam" : "You've been invited to JamKazam by #{@sender.name}!") %>
<% provide(:photo_url, @sender.resolved_photo_url) %>
To signup, please go to the <a style="color: #ffcc00;" href="<%= @signup_url %>">create account</a> page.
<% if @receiver %>
<a style="color: #ffcc00;" href="<%= @signup_url %>">Click here</a> to accept.
<% content_for :note do %>
<% if @note %>
<%= @sender.name %> says: <%= @note %>
<% else %>
<%= @sender.name %> would like you to join JamKazam.
<% end %>
<% if @note %>
<%= @sender.name %> says: <%= @note %>
<% else %>
<%= @sender.name %> would like you to be their friend on JamKazam, so that you can play in private sessions together.
<% end %>
<% end %>
<% else %>
To signup, please go to the <a style="color: #ffcc00;" href="<%= @signup_url %>">create account</a> page.
<% content_for :note do %>
<% if @note %>
<%= @sender.name %> says: <%= @note %>
<% else %>
<%= @sender.name %> would like you to join JamKazam.
<% end %>
<% end %>
<% end %>