summaryrefslogtreecommitdiff
path: root/app/helpers/notify_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/notify_helper.rb')
-rw-r--r--app/helpers/notify_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/notify_helper.rb b/app/helpers/notify_helper.rb
index c0ba93f4a30..ed96f3cef4f 100644
--- a/app/helpers/notify_helper.rb
+++ b/app/helpers/notify_helper.rb
@@ -20,4 +20,21 @@ module NotifyHelper
(source.description || default_description).truncate(200, separator: ' ')
end
+
+ def invited_join_url(token, member)
+ additional_params = { invite_type: Emails::Members::INITIAL_INVITE }
+
+ # order important below to our scheduled testing of these
+ # `from` experiment will be after the `text` on, but we may not cleanup
+ # from the `text` one by the time we run the `from` experiment,
+ # therefore we want to support `text` being fully enabled
+ # but if `from` is also enabled, then we only care about `from`
+ if experiment(:invite_email_from, actor: member).enabled?
+ additional_params[:experiment_name] = 'invite_email_from'
+ elsif experiment(:invite_email_preview_text, actor: member).enabled?
+ additional_params[:experiment_name] = 'invite_email_preview_text'
+ end
+
+ invite_url(token, additional_params)
+ end
end