Skip to content

Commit

Permalink
Merge c095fd1 into ed91fa4
Browse files Browse the repository at this point in the history
  • Loading branch information
TimJentzsch committed May 5, 2022
2 parents ed91fa4 + c095fd1 commit 481c42b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api/slack/transcription_check/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ def _get_check_base_text(check: TranscriptionCheck) -> str:
transcription = check.transcription
submission = transcription.submission
user: BlossomUser = transcription.author
username = user.username
user_link = f"<https://reddit.com/u/{username}?sort=new|u/{username}>"
is_nsfw = submission.nsfw
# Get the gamma at the time of the transcription that is checked
gamma = user.gamma_at_time(end_time=submission.complete_time)

base_text = f"Transcription check for *u/{user.username}* ({gamma:,d} Γ):\n"
base_text = f"Transcription check for *{user_link}* ({gamma:,d} Γ):\n"

# Add relevant links
tor_url = (
Expand All @@ -23,9 +25,12 @@ def _get_check_base_text(check: TranscriptionCheck) -> str:
post_url = "<{}|Partner Post>".format(submission.url) if submission.url else "[N/A]"
transcription_url = (
"<{}|Transcription>".format(transcription.url)
if transcription.url and not transcription.removed_from_reddit
if transcription.url
else "[Removed]"
)
if transcription.removed_from_reddit and transcription.url:
transcription_url += " [Removed]"

source = get_source(submission)
details = [tor_url, post_url, transcription_url, source]
# Indicate if the post is NSFW
Expand Down

0 comments on commit 481c42b

Please sign in to comment.