show reason on endorsements
parent
f8b4eeee51
commit
5b4fe4f442
|
@ -144,10 +144,13 @@ class Endorsements(Resource):
|
||||||
)
|
)
|
||||||
db.session.add(new_report)
|
db.session.add(new_report)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
if not database.has_recent_endorsement(target_instance.id):
|
# if not database.has_recent_endorsement(target_instance.id):
|
||||||
try:
|
try:
|
||||||
|
message = f"Your instance has just been [endorsed](https://fediseer.com/faq#what-is-an-endorsement) by {instance.domain}."
|
||||||
|
if reason is not None:
|
||||||
|
message = f"Your instance has just been [endorsed](https://fediseer.com/faq#what-is-an-endorsement) by {instance.domain} with reason: {reason}"
|
||||||
activitypub_pm.pm_admins(
|
activitypub_pm.pm_admins(
|
||||||
message=f"Your instance has just been [endorsed](https://fediseer.com/faq#what-is-an-endorsement) by {instance.domain}",
|
message=message,
|
||||||
domain=target_instance.domain,
|
domain=target_instance.domain,
|
||||||
software=target_instance.software,
|
software=target_instance.software,
|
||||||
instance=target_instance,
|
instance=target_instance,
|
||||||
|
|
Loading…
Reference in New Issue