diff --git a/liberapay/models/participant.py b/liberapay/models/participant.py index aae76c7f7..0a8b51c6a 100644 --- a/liberapay/models/participant.py +++ b/liberapay/models/participant.py @@ -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) diff --git a/liberapay/utils/emails.py b/liberapay/utils/emails.py index 8df0e05ec..e113cd2d9 100644 --- a/liberapay/utils/emails.py +++ b/liberapay/utils/emails.py @@ -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) diff --git a/www/%username/index.html.spt b/www/%username/index.html.spt index db64d474b..23922986b 100644 --- a/www/%username/index.html.spt +++ b/www/%username/index.html.spt @@ -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 @@ -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)

{{ _("Patrons") }}   {{ icon('download', _("Export as CSV")) }} diff --git a/www/robots.txt b/www/robots.txt index 0b7bb4448..c19af86b8 100644 --- a/www/robots.txt +++ b/www/robots.txt @@ -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=*