Don't welcome new users if they are suspended
This commit is contained in:
pare
f157e821bb
commit
d32cf1614a
S'han modificat 1 arxius amb 3 adicions i 3 eliminacions
|
@ -118,7 +118,7 @@ if __name__ == '__main__':
|
||||||
print("\nOnly 'ca', 'es' and 'en' languages are supported.\n")
|
print("\nOnly 'ca', 'es' and 'en' languages are supported.\n")
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
mastodon, mastodon_hostname = mastodon()
|
mastodon, mastodon_hostname = mastodon()
|
||||||
|
|
||||||
mastodon_db, mastodon_db_user, welcome_db, welcome_db_user = db_config()
|
mastodon_db, mastodon_db_user, welcome_db, welcome_db_user = db_config()
|
||||||
|
@ -319,7 +319,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
|
|
||||||
cur.execute("select username, domain from accounts where (created_at + interval '" + interval_time + "' > (now() - interval '1 hour')) and domain is null and id in (select account_id from users where approved and not disabled)")
|
cur.execute("select username, domain from accounts where (created_at + interval '" + interval_time + "' > (now() - interval '1 hour')) and domain is null and suspended_at is null and id in (select account_id from users where approved and not disabled)")
|
||||||
|
|
||||||
rows = cur.fetchall()
|
rows = cur.fetchall()
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ if __name__ == '__main__':
|
||||||
toot_text += mastodon_hostname + ' ' + welcomes_str + ':\n\n'
|
toot_text += mastodon_hostname + ' ' + welcomes_str + ':\n\n'
|
||||||
toot_text += new_users_string + "\n"
|
toot_text += new_users_string + "\n"
|
||||||
toot_text += "\n"
|
toot_text += "\n"
|
||||||
toot_text += "\n\n" + we_have_str + ' ' + str(current_id) + users_str + "\n\n"
|
toot_text += "\n\n" + we_have_str + ' ' + str(current_id) + ' ' + users_str + "\n\n"
|
||||||
toot_text += hourly_change_string
|
toot_text += hourly_change_string
|
||||||
toot_text += daily_change_string
|
toot_text += daily_change_string
|
||||||
toot_text += weekly_change_string
|
toot_text += weekly_change_string
|
||||||
|
|
Loading…
Referencia en una nova incidència