Skip to content

block/report abuse in dev-connect#2074

Merged
benhalpern merged 16 commits intoforem:masterfrom
mariocsee:connect-block
Mar 26, 2019
Merged

block/report abuse in dev-connect#2074
benhalpern merged 16 commits intoforem:masterfrom
mariocsee:connect-block

Conversation

@mariocsee
Copy link
Copy Markdown
Contributor

@mariocsee mariocsee commented Mar 15, 2019

What type of PR is this? (check all applicable)

  • Feature

Description

Adds blocking and report abuse to DEV Connect to prevent abuse. Users can keep their inbox open and blocked users cannot re-open chat with them.

blocked is now an option for ChatChannel status. This prevents a ChatChannel from being rendered in /connect and doesn't allow status to be changed to active. Currently, there is no way to unblock someone on /connect on the user side.

Related Tickets & Documents

continues off from #1563

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Blocking

blocking

Reporting Abuse

report-abuse

Added to documentation?

  • no documentation needed

@mariocsee mariocsee changed the title [wip] blocking/report abuse in dev-connect blocking/report abuse in dev-connect Mar 18, 2019
@mariocsee mariocsee self-assigned this Mar 18, 2019
@mariocsee mariocsee changed the title blocking/report abuse in dev-connect block/report abuse in dev-connect Mar 18, 2019
@mariocsee mariocsee requested a review from maestromac March 21, 2019 17:42
Copy link
Copy Markdown
Contributor

@benhalpern benhalpern left a comment

Choose a reason for hiding this comment

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

This is good to go, pending the one requested change.

@mariocsee mariocsee requested review from benhalpern and removed request for maestromac March 22, 2019 15:46
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Mar 25, 2019
def block_chat
chat_channel = ChatChannel.find(params[:chat_id])
policy = ChatChannelPolicy.new(current_user, chat_channel)
if policy.open? && chat_channel.valid? && chat_channel.channel_type == "direct"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This isn't really how policies are meant to be used, but this is technically solving the problem. Since this is outside of where you typically contribute, I'll just merge this and refactor it myself later and let you know what I did. I think that's simpler than holding this up right now.

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Mar 26, 2019
@benhalpern benhalpern merged commit 91968e3 into forem:master Mar 26, 2019
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Mar 26, 2019
@mariocsee mariocsee mentioned this pull request Apr 16, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: merged bot applied label for PR's that are merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants