mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Use display name rather than username in Discord webhooks
This commit is contained in:
parent
d374ce27cf
commit
18ee0108e5
@ -412,7 +412,7 @@ def move_to_state(package):
|
||||
|
||||
if state == PackageState.APPROVED:
|
||||
if not package.approved_at:
|
||||
post_discord_webhook.delay(package.author.username,
|
||||
post_discord_webhook.delay(package.author.display_name,
|
||||
"New package {}".format(package.get_url("packages.view", absolute=True)), False,
|
||||
package.title, package.short_desc, package.get_thumb_url(2, True))
|
||||
package.approved_at = datetime.datetime.now()
|
||||
@ -423,7 +423,7 @@ def move_to_state(package):
|
||||
|
||||
msg = "Approved {}".format(package.title)
|
||||
elif state == PackageState.READY_FOR_REVIEW:
|
||||
post_discord_webhook.delay(package.author.username,
|
||||
post_discord_webhook.delay(package.author.display_name,
|
||||
"Ready for Review: {}".format(package.get_url("packages.view", absolute=True)), True,
|
||||
package.title, package.short_desc, package.get_thumb_url(2, True))
|
||||
|
||||
|
@ -127,7 +127,7 @@ def review(package):
|
||||
url_for("threads.view", id=thread.id), package)
|
||||
|
||||
if was_new:
|
||||
post_discord_webhook.delay(thread.author.username,
|
||||
post_discord_webhook.delay(thread.author.display_name,
|
||||
"Reviewed {}: {}".format(package.title, thread.get_view_url(absolute=True)), False)
|
||||
|
||||
db.session.commit()
|
||||
|
Loading…
Reference in New Issue
Block a user