Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Dependency List
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 159
    • Issues 159
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 46
    • Merge Requests 46
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !217

Open
Opened 3 days ago by Marcelo Rivera@eiennohi
  • Report abuse
Report abuse

[Sprint/HipsterHedgehog] (feat): update language on strike emails

closes https://gitlab.com/minds/engine/issues/547

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://gitlab.com/eiennohi/engine.git sprint/HipsterHedgehog.feat.update-language-on-strike-emails
git checkout -b eiennohi/engine-sprint/HipsterHedgehog.feat.update-language-on-strike-emails FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff eiennohi/engine-sprint/HipsterHedgehog.feat.update-language-on-strike-emails

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge eiennohi:sprint/HipsterHedgehog.feat.update-language-on-strike-emails into master
The source branch is 6 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #67387043 passed for cd801a1b on eiennohi:sprint/HipsterHedgehog.feat.update-language-on-strike-emails
      Requires 2 more approvals from Devs.
      Emiliano Balbuena
      Emiliano Balbuena
      Mark Harding
      Mark Harding
      Martin Santangelo
      Martin Santangelo
      Rami Albatal
      Rami Albatal
      Brian Hatchet
      Brian Hatchet
      Ready to be merged automatically. Ask someone with write access to this repository to merge this request

      Allows commits from members who can merge to the target branch

      Closes #547

      Deletes source branch

      • Discussion 4
      • Commits 4
      • Pipelines 1
      • Changes 6
      0/4 discussions resolved
      • Loading...
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 2 hours ago
        Core/Email/Campaigns/Templates/moderation-3-strikes-nsfw.md.tpl
        1 It looks like your post has been tagged as **(<?php echo $vars['tag']; ?> - <?php echo $vars['subaction']; ?>)** for containing (<?php echo $vars['subaction']; ?>) that is not safe for the workplace. This is your <?php echo $vars['strikeNumber']; ?> strike.
        2
        3 Don’t worry...your post will not be removed and your channel is not at risk of being banned. Because you have received three strikes in this category, your content will now be automatically tagged as **(<?php echo $vars['tag']; ?> - <?php echo $vars['subaction']; ?>)**.
        • Brian Hatchet
          Brian Hatchet :speech_balloon: @brianhatchet · 2 hours ago
          Maintainer

          All the new emails have been pretty rich text. Are we sure we want these in plain text?

        Please register or sign in to reply
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 2 hours ago
        Core/Email/Campaigns/Templates/moderation-3-strikes-nsfw.md.tpl
        1 It looks like your post has been tagged as **(<?php echo $vars['tag']; ?> - <?php echo $vars['subaction']; ?>)** for containing (<?php echo $vars['subaction']; ?>) that is not safe for the workplace. This is your <?php echo $vars['strikeNumber']; ?> strike.
        2
        3 Don’t worry...your post will not be removed and your channel is not at risk of being banned. Because you have received three strikes in this category, your content will now be automatically tagged as **(<?php echo $vars['tag']; ?> - <?php echo $vars['subaction']; ?>)**.
        4
        5 If you believe that a mistake has been made, you may appeal this decision to a jury of your peers. If you wish to learn more about our policy and appeal process, please visit our Content Policy.
        • Brian Hatchet
          Brian Hatchet :speech_balloon: @brianhatchet · 2 hours ago
          Maintainer

          Case in point, these calls to actions should be lins to our content policy

        Please register or sign in to reply
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 2 hours ago
        Core/Reports/Strikes/Delegates/EmailDelegate.php
        64 $vars['strikeNumber'] = $this->getStrikeNumberFriendlyString($strike);
        65
        66 $subject = 'Your post was tagged as NSFW' . '(' . ucfirst($vars['strikeNumber']) . ' Notice)';
        52 67 break;
        53 68 }
        54 69
        55 $this->campaign->setUser($owner);
        56 $this->campaign->setTemplate('moderation-strike.md');
        57 $this->campaign->setSubject('You have received a strike');
        58 $this->campaign->setVars([
        70 $vars[] = [
        59 71 'type' => $type,
        60 72 'action' => $action,
        61 73 //'reason' => $reason,
        62 ]);
        74 ];
        • Brian Hatchet
          Brian Hatchet :speech_balloon: @brianhatchet · 2 hours ago
          Maintainer

          We should enable the click back mechanisms for all our emails. The email campaigns have a pretty seamless mechanism for creating CTAs and that get registered by the router and tracked in our activity index.

        Please register or sign in to reply
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 2 hours ago
        Core/Reports/Verdict/Delegates/ActionDelegate.php
        180 183 ->setTimestamp($report->getTimestamp()); // Strike is recored for date of first report
        181 184
        182 185 $count = $this->strikesManager->countStrikesInTimeWindow($strike, $this->strikesManager::STRIKE_TIME_WINDOW);
        186 $retentionCount = $this->strikesManager->countStrikesInTimeWindow($strike, $this->strikesManager::STRIKE_RETENTION_WINDOW);
        187
        188 $strike->setNumber($retentionCount ?? 1);
        183 189
        184 190 if (!$count) {
        185 191 $this->strikesManager->add($strike);
        186 192 }
        187 193
        188 194 // If 3 or more strikes, ban or apply NSFW lock
        189 if ($this->strikesManager->countStrikesInTimeWindow($strike, $this->strikesManager::STRIKE_RETENTION_WINDOW) >= 3) {
        195 if ($retentionCount >= 3) {
        • Brian Hatchet
          Brian Hatchet :speech_balloon: @brianhatchet · 2 hours ago
          Maintainer

          These numeric values should be constants.

        Please register or sign in to reply
      • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
      Please register or sign in to reply
      Assignee
      None
      Assign to
      None
      Milestone
      None
      Assign milestone
      None
      Time tracking
      No estimate or time spent
      0
      Labels
      None
      Assign labels
      • View project labels
      Lock merge request
      Unlocked
      7
      7 participants
      user avatar
      Emiliano Balbuena
      user avatar
      Mark Harding
      user avatar
      Martin Santangelo
      user avatar
      Rami Albatal
      user avatar
      Brian Hatchet
      user avatar
      Ben Hayward
      user avatar
      Marcelo Rivera
      Reference: minds/engine!217