Lbry-desktop: Move "Report" feature to inside of app?

Created on 28 Dec 2017  路  18Comments  路  Source: lbryio/lbry-desktop

The Issue

The Report feature, which is used to report content for infringement, opens in a separate web page outside of the app.

Should this be moved to inside the app eventually?

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

discussion improvement

All 18 comments

I think this should definitely live inside the app. Shouldn't be too difficult.

Working on this.

@seanyesmunt @tzarebczan I have an implementation ready, but it's missing the actual submitting of the report. I couldn't figure out how the current web form does the submitting, and there's nothing in the app for this yet.

How this implementation works is:

  1. Click the report button on a file page
  2. App shows report page and prefills the uri of the file
  3. Fill in the form and submit
  4. App shows a confirmation with snackbar and navigates back to the file page

This can also be used by itself, for example from the sidebar. Only then the infringing file uri would not be prefilled.

screen shot 2018-04-11 at 12 35 58

@miikkatu thanks for working on this. Unfortunately, the current end behavior of a DMCA report is just trigger an email (see here) and this is not easy to just move into the app.

I filed an issue in our internal-apis project to build an endpoint for receiving these, but I'm afraid this one is blocked until that happens.

Although I suppose you could post to lbry.io/dmca in the interim... that would allow this to be shipped.

Although I suppose you could post to lbry.io/dmca in the interim

I was thinking about this too. For this, we would need an URL where to POST, and an object format that it would accept. I couldn't figure those out in the lbry.io/dcma code. Then, a team member could verify if the posted data is proper or not.

Otherwise, we could wait with this until there's an endpoint available. 馃檪

post

@miikkatu this is what the post call looks like - should be able to pass the same parameters (might need to URL encode them as well)

If it helps, the server side code is here: https://github.com/lbryio/lbry.io/blob/90eae9cbfc7a66dba9b59c51652adf06a63f0718/controller/action/ReportActions.class.php / https://github.com/lbryio/lbry.io/blob/810acf0c1f6368c30093a1fb5c5edb9b7d5f0a9a/view/template/report/dmca.php

I now have a CORS issue. I use a similar approach when making the POST as in Lbryio.call function. However, I get a 405 response.

The code bit that does the request is like this:

      const report = {
        email: this.state.email,
        identifier: this.state.identifier,
        name: this.state.name,
        rightsholder: this.state.rightsholder,
      };

      const qs = querystring.stringify(report);
      const options = {
        method: 'POST',
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded',
        },
        body: qs,
      };

      fetch('https://lbry.io/dcma', options).then(response => {
        // fetch returns 405 (method not allowed)

screen shot 2018-04-19 at 8 13 12

screen shot 2018-04-19 at 8 11 07

@miikkatu we'll likely get this fixed web-side within a week or so. I'm inclined to just allow unrestricted POSTs to lbry.io/dmca.

See https://github.com/lbryio/lbry.io/issues/517

PR has been submitted on lbry.io https://github.com/lbryio/lbry.io/pull/525

@miikkatu CORS change is merged if you want to test this in app. Feel free to spam the endpoint, they only come to a few people and they'll be aware. (@finer9 @tzarebczan)

I still get the same CORS error. Have the merged change been deployed to the site yet?

Hmm, @maximest-pierre any thoughts? It was merged here: https://github.com/lbryio/lbry.io/pull/525

Yes it was merge, I look at it quickly this morning. Both GET and POST header shows that its enabled.

Is it still a 405 error or is it a 301 error now. @miikkatu

@maximest-pierre 405, just like before (screenshot above).

Can you open a PR with your current code so I can recreate your error.

@maximest-pierre PR opened. The fetch request code is in src/renderer/page/reportcontent/view.jsx. Hopefully you can recreate the error and find out what's going on. 馃檪

closing, we will keep the webpage and not move into the app

Was this page helpful?
0 / 5 - 0 ratings