Skip to content

Commit

Permalink
Updated Terms of Service (#1978)
Browse files Browse the repository at this point in the history
* Email TOS

* Fix travis yet again

* Create an order
  • Loading branch information
Cory McDonald authored Jun 19, 2019
1 parent 5b81419 commit 48b5494
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ script:
- yarn install
- yarn audit
- yarn lint
- bin/rails test
- bundle exec rails test
- yarn test
- bundle exec brakeman
- bundle exec rubocop
7 changes: 7 additions & 0 deletions app/mailers/publisher_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ def email_user_on_hold(publisher)
)
end

def update_to_tos(publisher)
@publisher = publisher
mail(
to: @publisher.email || @publisher.pending_email,
subject: default_i18n_subject
)
end

private

Expand Down
3 changes: 3 additions & 0 deletions app/views/publisher_mailer/update_to_tos.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
p.salutation= t "publisher_mailer.shared.salutation", name: @publisher.name

p== t(".body", link: ENV["CALENDLY_LINK"], month: Date.today.strftime("%B"))
67 changes: 67 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,73 @@ en:
Thank you.
<br/><br/>
The Brave Rewards | Creator team
update_to_tos:
subject: Updates to the Brave Rewards Terms of Service for Creators
body: >
<p>
We know it’s not glamorous or exciting, but we’ve made some changes to the <a href="https://basicattentiontoken.org/publisher-terms-of-service/">Brave Rewards Terms of Service.</a> We'd love for you to take a look so that you can see the whole updated document. But just to make things a little easier, here’s a quick summary of all the recent changes.
</p>
In June:
<table cellpadding="2" cellspacing="2" border="0">
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We made it clear we would not send BAT belonging to Brave (including UGP grants and referral payments) to anyone who encourages or engages in violence.
</td>
</tr>
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We explained how UGP grants work in the terms for publishers, where it was previously only in the user terms.
</td>
</tr>
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We noted that we are the judge of what is and isn’t the prohibited conduct described in §8.
</td>
</tr>
</table>
<br/>
In April:
<table cellpadding="2" cellspacing="2" border="0">
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We launched Brave Ads! Now there are terms for advertisers, and the terms for publishers reflects that.
</td>
</tr>
</table>
<br/>
In March:
<table cellpadding="2" cellspacing="2" border="0">
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We made it possible for people aged 16 and up to use Brave Rewards with a parent’s permission.
</td>
</tr>
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We rewrote §4, which explains how contributions work. Contributions essentially didn’t change, we just described them better.
</td>
</tr>
<tr>
<td style="vertical-align:top;">&ndash;</td>
<td>
We also made some formatting changes which you might not notice, but we think makes the whole thing easier to read.
</td>
</tr>
</table>
<p>This is only a summary. It doesn’t describe everything that changed. You should read the <a href="https://basicattentiontoken.org/publisher-terms-of-service/">actual real policy.</a></p>
<p>
Thanks for being a Brave Rewards Creator,
<br/>
The Brave Rewards Team
</p>
login_email:
subject: Log in to Brave Rewards
body_html: |
Expand Down
19 changes: 19 additions & 0 deletions lib/tasks/email_tos_update.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace :email do
task :tos_update => :environment do
puts "Emailing #{Publisher.count} users"

Publisher.order(:id).find_each.with_index do |user, index|
begin
PublisherMailer.update_to_tos(user).deliver_now
print '.' if index % 1000 == 0
rescue
# Let's rescue all exceptions
print "X"
Rails.logger.info "[#{Time.now.iso8601}] Could not send terms and conditions for [#{user.id}]"
end
end

puts
puts "✨ Done"
end
end
4 changes: 4 additions & 0 deletions test/mailers/previews/publisher_mailer_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,8 @@ def tagged_in_note
def email_user_on_hold
PublisherMailer.email_user_on_hold(Publisher.first)
end

def update_to_tos
PublisherMailer.update_to_tos(Publisher.first)
end
end

0 comments on commit 48b5494

Please sign in to comment.