Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Remove email notifications related to pledging
Browse files Browse the repository at this point in the history
Sorry, @rohitpaulk. :-(
  • Loading branch information
chadwhitacre committed May 12, 2015
1 parent 4e40035 commit ceb10c7
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 96 deletions.
14 changes: 0 additions & 14 deletions emails/notify_patron.spt

This file was deleted.

1 change: 0 additions & 1 deletion gratipay/models/account_elsewhere.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ def opt_in(self, desired_username):
else:
newly_claimed = True
user.participant.set_as_claimed()
user.participant.notify_patrons(self)
try:
user.participant.change_username(desired_username)
except ProblemChangingUsername:
Expand Down
18 changes: 0 additions & 18 deletions gratipay/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,19 +658,6 @@ def render(t, context):
self._mailer.messages.send(message=message)
return 1 # Sent

def notify_patrons(self, elsewhere, tips=None):
tips = self.get_tips_receiving() if tips is None else tips
for t in tips:
p = Participant.from_username(t.tipper)
if p.email_address and p.notify_on_opt_in:
p.queue_email(
'notify_patron',
user_name=elsewhere.user_name,
platform=elsewhere.platform_data.display_name,
amount=t.amount,
profile_url=elsewhere.gratipay_url,
)

def queue_email(self, spt_name, **context):
self.db.run("""
INSERT INTO email_queue
Expand Down Expand Up @@ -1602,8 +1589,6 @@ def take_over(self, account, have_confirmation=False):
# this is a no op - trying to take over itself
return

# Save old tips so we can notify patrons that they've been claimed
old_tips = None if other.is_claimed else other.get_tips_receiving()

# Make sure we have user confirmation if needed.
# ==============================================
Expand Down Expand Up @@ -1740,9 +1725,6 @@ def take_over(self, account, have_confirmation=False):
if new_balance is not None:
self.set_attributes(balance=new_balance)

if old_tips:
self.notify_patrons(elsewhere, tips=old_tips)

self.update_avatar()

# Note: the order matters here, receiving needs to be updated before giving
Expand Down
1 change: 1 addition & 0 deletions sql/branch.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
BEGIN;

ALTER TABLE participants DROP COLUMN pledging;
ALTER TABLE participants DROP COLUMN notify_on_opt_in;

END;
58 changes: 0 additions & 58 deletions tests/py/test_email_notifs.py

This file was deleted.

5 changes: 0 additions & 5 deletions www/~/%username/settings/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ emails = participant.get_emails()
<div class="email-notifications">
<span>{{ _("Send me notifications via email:") }}</span>
<br />
<label>
<input type="checkbox" data-field="notify_on_opt_in"
{{ 'checked' if participant.notify_on_opt_in }} />
{{ _("When people I pledge to join Gratipay") }}
</label>
<div>
{{ _("When my credit card is charged:") }}
<br />
Expand Down

0 comments on commit ceb10c7

Please sign in to comment.