Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

WIP Slack Ping For Transcripts on Tor Posts #357

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

erenbektas
Copy link
Member

@erenbektas erenbektas commented Aug 25, 2022

Closes #355

This sends a message to #general channel on Slack when a transcriber posts a transcription under a ToR post.

It should be like:

Looks like u/jenoah_m posted a transcription on ToR Post instead of posting it on r/ProgrammerHumor. 🤔

Note that, following words in this message will be hyperlinked to the related targets:

  1. u/jenoah_m (to user's profile)
  2. transcription (to the transcription comment on ToR Post)
  3. ToR Post (to the ToR Post where the transcription was posted)
  4. r/ProgrammerHumor (to the post on partner sub)

This sends a message to #general channel on Slack when a transcriber posts a transcription under a ToR post.
@erenbektas erenbektas requested a review from a team as a code owner August 25, 2022 10:00
tor/core/inbox.py Outdated Show resolved Hide resolved
tor/core/inbox.py Outdated Show resolved Hide resolved
@@ -17,6 +17,8 @@ mod:
formatting_issues: |
I detected formatting issues in the transcription by {author}: {issues}
{link}
transcript_on_tor_post: |
Looks like {user_url} posted a [transcription]({post_url}) on [ToR Post]({tor_post}) instead of posting it on [r/{sub_name}]({post_link}). :facepalm:
Copy link
Member

@itsthejoker itsthejoker Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string is going to slack, right? It would probably be better if we use the native slack link formatting.

Suggested change
Looks like {user_url} posted a [transcription]({post_url}) on [ToR Post]({tor_post}) instead of posting it on [r/{sub_name}]({post_link}). :facepalm:
Looks like <{user_url}|{user_url}> posted a <{post_url}|transcription> on <{tor_post}|the ToR Post> instead of posting it on <{post_link}|r/{sub_name}>. :facepalm:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Member Author

@erenbektas erenbektas Aug 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I finally found some more time to work on this. I didn't know that slack had some different formatting for that! Thankss

tor/core/inbox.py Outdated Show resolved Hide resolved
@erenbektas erenbektas changed the title Slack Ping For Transcripts on Tor Posts WIP Slack Ping For Transcripts on Tor Posts Aug 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send messages to mods when someone posts a transcription to r/ToR
3 participants