|
|
@@ -35,7 +35,7 @@ def accept_donation(donation_info, donation_points, donation_service):
|
|
|
current_app.logger.info(f'Public donation of ${amount} received from {name} via {donation_service}')
|
|
|
else:
|
|
|
message = None
|
|
|
- current_app.logger.info(f'Private donation of ${amount} received from {name} via {donation_service}')
|
|
|
+ current_app.logger.info(f'Anonymous donation of ${amount} received via {donation_service}')
|
|
|
if message is not None: # Only send chat message if it's a public donation
|
|
|
send_chat(message)
|
|
|
return True
|
|
|
@@ -59,7 +59,7 @@ def accept_kofi_sub(sub_info, sub_points):
|
|
|
if not ids: # If no id found with that email address
|
|
|
if add_email_to_points(db, email, points): # Create empty account with email and points
|
|
|
name = 'Someone'
|
|
|
- current_app.logger.info(f'No user with email \"{email}\" found in database, created empty account.')
|
|
|
+ current_app.logger.info(f'No user with email \"{email}\" found in database, created empty Owncast account.')
|
|
|
else: # Grant points to the corresponding id
|
|
|
for id in ids:
|
|
|
if award_chat_points(db, id[0], points): # Grant points
|
|
|
@@ -74,20 +74,20 @@ def accept_kofi_sub(sub_info, sub_points):
|
|
|
current_app.logger.info(f'Public subscription received from {name}')
|
|
|
else:
|
|
|
message = f'{name} got {porps(points)} for renewing their membership on Kofi!'
|
|
|
- current_app.logger.info(f'Public subscription renewal received from {name}')
|
|
|
+ current_app.logger.info(f'Anonymous {donation_service} renewal received.')
|
|
|
send_chat(message) # Send message publicly if a public membership
|
|
|
else:
|
|
|
if not ids:
|
|
|
- current_app.logger.info(f'No account to associate with.')
|
|
|
+ current_app.logger.info(f'No Owncast account to associate {donation_service} subscription with.')
|
|
|
# return True
|
|
|
if not name: # If no name in points table
|
|
|
name = sub_info[1] # Assign name from Kofi response
|
|
|
if first_sub:
|
|
|
message = f'Thanks so much for your subscribing to my Kofi! You\'ve been awarded {porps(points)}!'
|
|
|
- current_app.logger.info(f'Private subscription received from {name}')
|
|
|
+ current_app.logger.info(f'Anonymous {donation_service} subscription received.')
|
|
|
else:
|
|
|
message = f'Thanks so much for renewing your membership to my Kofi! You\'ve been awarded {porps(points)}!'
|
|
|
- current_app.logger.info(f'Private subscription renewal received from {name}')
|
|
|
+ current_app.logger.info(f'Anonymous {donation_service} subscription renewal received.')
|
|
|
send_private_chat(id[0], message)
|
|
|
return True
|
|
|
except Exception as aderror:
|