Skip to content

Commit

Permalink
Merge pull request #2509 from liberapay/various
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco authored Nov 30, 2024
2 parents 7adaccb + 5c2e49c commit 760015c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 6 additions & 4 deletions liberapay/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,10 +1367,12 @@ def dequeue(msg, status):
""")

def set_email_lang(self, lang, cursor=None):
(cursor or self.db).run(
"UPDATE participants SET email_lang=%s WHERE id=%s",
(lang, self.id)
)
with self.db.get_cursor(cursor=cursor) as c:
c.run(
"UPDATE participants SET email_lang=%s WHERE id=%s",
(lang, self.id)
)
self.add_event(c, 'set_email_lang', lang)
self.set_attributes(email_lang=lang)


Expand Down
4 changes: 3 additions & 1 deletion liberapay/utils/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ def test_email_server(ip_address: str, email=None, timeout=None) -> None:
# OpenSMTPD
msg.startswith("Invalid recipient: ") or
# Tutanota's SMTP server
msg.endswith("Recipient address rejected: Recipient not found")
msg.endswith("Recipient address rejected: Recipient not found") or
# Yandex
msg.startswith("No such user")
)
if recipient_rejected:
raise EmailAddressRejected(email, msg, ip_address)
Expand Down
4 changes: 2 additions & 2 deletions www/%username/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ communities = () # participant.get_communities()
langs = participant.get_statement_langs(include_conversions=True)

patron_visibilities = participant.recipient_settings.patron_visibilities or 0
if patron_visibilities > 1:
if patron_visibilities & 4:
public_patrons = website.db.all("""
SELECT tipper_p.id
, tipper_p.avatar_url
Expand Down Expand Up @@ -208,7 +208,7 @@ show_income = not participant.hide_receiving and participant.accepts_tips
% endif
% endif

% if patron_visibilities > 1 and n_public_patrons
% if n_public_patrons|default(0)
<h3>{{ _("Patrons") }}
&nbsp;
<small><a href="{{ participant.path('patrons/public.csv') }}">{{ icon('download', _("Export as CSV")) }}</a></small>
Expand Down
4 changes: 4 additions & 0 deletions www/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ Disallow: /log-in?back_to=*
Disallow: /sign-in?back_to=*
Disallow: /*.json
Disallow: /*/income/
Disallow: /*/widgets/*.js
Disallow: /*?page=*
Disallow: /*&page=*
Disallow: /*?last_shown=*
Disallow: /*&last_shown=*

0 comments on commit 760015c

Please sign in to comment.