|
32 | 32 | from python_http_client.exceptions import HTTPError, UnauthorizedError
|
33 | 33 | from retail.emails import (
|
34 | 34 | email_to_profile, get_notification_count, render_admin_contact_funder, render_bounty_changed,
|
35 |
| - render_bounty_expire_warning, render_bounty_feedback, render_bounty_hypercharged, |
| 35 | + render_bounty_expire_warning, render_bounty_hypercharged, |
36 | 36 | render_bounty_startwork_expire_warning, render_bounty_unintersted, render_comment, render_featured_funded_bounty,
|
37 |
| - render_funder_payout_reminder, render_funder_stale, render_gdpr_reconsent, render_gdpr_update, |
| 37 | + render_funder_payout_reminder, render_gdpr_reconsent, render_gdpr_update, |
38 | 38 | render_grant_cancellation_email, render_grant_match_distribution_final_txn, render_grant_recontribute,
|
39 | 39 | render_grant_txn_failed, render_grant_update, render_match_distribution, render_match_email, render_mention,
|
40 | 40 | render_new_bounty, render_new_bounty_acceptance, render_new_bounty_rejection, render_new_bounty_roundup,
|
@@ -436,70 +436,6 @@ def admin_contact_funder(bounty, text, from_user):
|
436 | 436 | translation.activate(cur_language)
|
437 | 437 |
|
438 | 438 |
|
439 |
| -def funder_stale(to_email, github_username, days=30, time_as_str='about a month'): |
440 |
| - |
441 |
| - cur_language = translation.get_language() |
442 |
| - try: |
443 |
| - setup_lang(to_email) |
444 |
| - |
445 |
| - subject = "hey from gitcoin.co" if not github_username else f"hey @{github_username}" |
446 |
| - __, text = render_funder_stale(github_username, days, time_as_str) |
447 |
| - cc_emails = [] |
448 |
| - if allowed_to_send_email(to_email, 'admin_contact_funder'): |
449 |
| - send_mail( |
450 |
| - from_email, |
451 |
| - to_email, |
452 |
| - subject, |
453 |
| - text, |
454 |
| - cc_emails=cc_emails, |
455 |
| - from_name=from_email, |
456 |
| - categories=['transactional', func_name()], |
457 |
| - ) |
458 |
| - finally: |
459 |
| - translation.activate(cur_language) |
460 |
| - |
461 |
| - |
462 |
| -def bounty_feedback(bounty, persona='fulfiller', previous_bounties=None): |
463 |
| - |
464 |
| - to_email = None |
465 |
| - cur_language = translation.get_language() |
466 |
| - if previous_bounties is None: |
467 |
| - previous_bounties = [] |
468 |
| - |
469 |
| - try: |
470 |
| - setup_lang(to_email) |
471 |
| - if persona == 'fulfiller': |
472 |
| - accepted_fulfillments = bounty.fulfillments.filter(accepted=True) |
473 |
| - to_email = accepted_fulfillments.first().fulfiller_email if accepted_fulfillments.exists() else "" |
474 |
| - elif persona == 'funder': |
475 |
| - to_email = bounty.bounty_owner_email |
476 |
| - if not to_email: |
477 |
| - if bounty.bounty_owner_profile: |
478 |
| - to_email = bounty.bounty_owner_profile.email |
479 |
| - if not to_email: |
480 |
| - if bounty.bounty_owner_profile and bounty.bounty_owner_profile.user: |
481 |
| - to_email = bounty.bounty_owner_profile.user.email |
482 |
| - if not to_email: |
483 |
| - return |
484 |
| - |
485 |
| - subject = bounty.github_url |
486 |
| - html, text = render_bounty_feedback(bounty, persona, previous_bounties) |
487 |
| - cc_emails = [ from_email, '[email protected]'] |
488 |
| - if allowed_to_send_email(to_email, 'bounty_feedback'): |
489 |
| - send_mail( |
490 |
| - from_email, |
491 |
| - to_email, |
492 |
| - subject, |
493 |
| - text, |
494 |
| - html, |
495 |
| - cc_emails=cc_emails, |
496 |
| - from_name="Gitcoin Product Team", |
497 |
| - categories=['transactional', func_name()], |
498 |
| - ) |
499 |
| - finally: |
500 |
| - translation.activate(cur_language) |
501 |
| - |
502 |
| - |
503 | 439 | def tip_email(tip, to_emails, is_new):
|
504 | 440 | round_decimals = 5
|
505 | 441 | if not tip or not tip.txid or not tip.amount or not tip.tokenName:
|
|
0 commit comments