giseldo/neodataset huggingface dataset:
(bug): User is not marked as blocked after blocking in messenger

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Reported by Ubertesters.

### Steps to reproduce

1. In messenger open a chat and choose block.
2. Close the chat window.
3. Open chat window again.

### Platform information 

Laptop windows 10, Chrome

Username: yahya94

### What is the current *bug* behavior?

1. Second party is not marked as blocked.
2. User is able to block second party again.
3. Second party is not receiving the messages.
4. User is unable to unblock second party.

### What is the expected *correct* behavior?

1. Second party should be marked as blocked.
2. User should not be able to block second party again.
3. User should not be able to send messages.
4. User should be able to unblock Second party.

### Relevant logs and/or screenshots

https://dashboard.ubertesters.com/uploads/8463/11810/issues/64/153839/deeshanib%20_%20Minds%20(1).mp4

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 4.0
(bug): cannot delete replies to comments on your own posts

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

As the owner of a post, I am unable to delete a reply to another users comment on my own post.

### Steps to reproduce

1. Create a post
2. From another channel, comment on the post
3. From a third channel, reply to a comment on the post
4. From the original posting channel, try to delete the reply comment.

### Platform information 

Chrome, Macbook air, 12.1

### What is the expected *correct* behavior?

Post owners should be able to delete all comments and replies on their own posts. The comment owner should maintain the ability to delete the reply as well.

Story points: 5.0
(bug): seeing my username twice in gathering

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

(Summarize the bug encountered concisely)

keep seeing my username twice in other people's screens

### Steps to reproduce

(How one can reproduce the issue - this is very important)

### Platform information 

(Browser, device, system stats, screen size)

ubuntu, firefox and chrome

### What is the current *bug* behavior?

(What actually happens)

### What is the expected *correct* behavior?

(What you should see instead)

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

![Screenshot_from_2019-02-08_15-30-38](/uploads/ab71171b994dff5114d3cf5cbf13a289/Screenshot_from_2019-02-08_15-30-38.png)![Screenshot_from_2019-02-06_14-34-36](/uploads/67f06f8e1ee79f7c72fc900e5255a533/Screenshot_from_2019-02-06_14-34-36.png)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 5.0
(feat): Migration script for reports which are not in ES at switch over.

There are many options to handle existing reports when we toggle ES on completely.
1. We may migrate all new reports and leave all old reports and resolutions alone.
2. We can migrate ALL report data so it is queryable in ES.
3. We can lose the reports which are unresolved at the time of the switch.

I prefer one or two. Three is obviously the cheapest.

Story points: 10.0
YouTube migrator bugs

- [x] Transfer all videos button broken
- [x] Auto-import checkbox broken
- [x] 0 queued, 0 transferring headers do not update 
- [ ] Need a live x% complete next to 'transferring'
- [ ] Fix thumbnail issues
- [ ] Need some sort of prompt to let user know that we will automatically take 10/day and that they can walk away
- [x] Invalid date on Transferred tab
- [x] Fix newsfeed posts to reflect youtube upload date
- [ ] Implement alternative authentication option for adding link to youtube description

Story points: 1.0
Suggested channels and groups for new user not working properly

Steps to replicate:

1. Create a new account
2. Join Canary mode
3. Look at the Suggested Groups and Channels (see screenshot)

![Screen_Shot_2020-05-07_at_1.14.07_PM](/uploads/7fcb7944967488f663ddc9e41035caf6/Screen_Shot_2020-05-07_at_1.14.07_PM.png)

Suggested Channels should be based on who Minds has subscribed to for now. Suggested groups should be what groups those suggestions are joining.

Story points: 2.0
Sync Support Tiers when wire_rewards is updated

- [x] Run `UserWireRewardsMigrationDelegate::migrate` when `wire_rewards` is updated
- [x] Clear existing Support Tiers on migration
- [x] Ensure Support Tier GUID is persistent (based on currency and amount) when migrating

### Original implementation details
> - New delegate called whenever `wire_rewards` is modified
> - Read existing rewards. Create new ones, delete deprecated and modify existing.
> 
> Notes
> - A Support Tier should be created if there isn't another one with the same currency/amount values
> - A Support Tier should be deleted if there's no matching wire_rewards entry for it
> - A Support Tier should be modified if there's a difference in the wire_rewards description text (same currency/amount match)

Story points: 2.0
Banned channels showing in suggested channels

Scrolling through suggested channels full feed view, i came across https://www.minds.com/laura999/ and when I clicked, they were banned.

Need to make sure deleted, banned or deactivated channels are not appearing in these suggestions. Eventually, we will want to make sure inactive channels do not appear either (or now if its a quick fix). 

Looking great overall!

@markeharding

Story points: 1.0
Make right hand column sticky in newsfeed, discovery, channels

Per @michaelfbradley mockups and feedback from users about use of space on new design:

We need the right hand column to scroll independently of the middle column on Newsfeed, Discovery, Channels and Groups (eventually).

This will ensure that when a user is scrolling down the content feed, the right hand column does not go blank and create an illusion that we are not using space as well as we should. See Twitter UX behavior for reference if needed.



Story points: 2.0
Unable to run YouTubeImporter cli

* Video statistics returning null for several videos
* Fetch video URL when about to import, to avoid link expiration
* fix the following issue:
```
Minds.CRITICAL: TypeError: Argument 1 passed to Minds\Core\Media\YouTubeImporter\Manager::validateChannel() must be an instance of Minds\Entities\User, null given, called in /var/www/eggman/engine/Core/Media/YouTubeImporter/Manager.php on line 200 and defined in /var/www/eggman/engine/Core/Media/YouTubeImporter/Manager.php:726 Stack trace: #0 /var/www/eggman/engine/Core/Media/YouTubeImporter/Manager.php(200): Minds\Core\Media\YouTubeImporter\Manager->validateChannel(NULL, NULL) #1 /var/www/eggman/engine/Controllers/Cli/YouTubeImporter.php(34): Minds\Core\Media\YouTubeImporter\Manager->getVideos(Array) #2 /var/www/eggman/engine/cli.php(60): Minds\Controllers\Cli\YouTubeImporter->exec() #3 {main} {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Minds\\Core\\Media\\YouTubeImporter\\Manager::validateChannel() must be an instance of Minds\\Entities\\User, null given, called in /var/www/eggman/engine/Core/Media/YouTubeImporter/Manager.php on line 200 at /var/www/eggman/engine/Core/Media/YouTubeImporter/Manager.php:726)"} 
```

Story points: 5.0
Remove mobile settings that are not functional

Many of the mobile settings do not function when tapped. We should hide them until they are functional.

Broken settings:
- Billing --> Payment Methods (does not work)
- Billing --> Recurring Payments (does not work)
- Other --> Reported content (white screen freezes app)
- Other --> Subscription tier management (does not work)
- Other --> Post preview (does not work)

Story points: 1.0
1080 video not working on pro uploads

https://www.minds.com/newsfeed/1101897488370221056

https://www.minds.com/newsfeed/1101883430935887872 I upload as a full 1080p capture, its is reduced to 1024
https://cdn.minds.com/fs/v1/thumbnail/1102183590279245824/xlarge/ is the largest it seems to go

Story points: 3.0
Escaped HTML tags being displayed in v2 Title

### Summary

Reports are coming in of Titles showing Escaped HTML `<p>` and `<br>` tags. Tags might be getting saved as title data by composer instead of being striped.

### Steps to reproduce

Has something to do with editing existing posts but having trouble replicating. 

Example post: https://www.minds.com/newsfeed/1100855661663576064

### Platform information 

Chrome

### What is the current *bug* behavior?

Escaped HTML appearing in title field

### What is the expected *correct* behavior?

(What you should see instead)

### Relevant logs and/or screenshots

![image](/uploads/612a97be8d5f6bea21bc25d18c7f3415/image.png) 

![image](/uploads/84ff6d579cc80549d30976973acca146/image.png)

![image](/uploads/11a7634369ce4f05c7a6b7983451f6c2/image.png)

I tried copying a title with HTML and pasting it into the v1 edit composer and the v2 edit composer but I could not replicate. I could get BR tags into the title field this way though.

![image](/uploads/b5b8c50bf43e1019866121a54ad8a190/image.png)

Story points: 1.0
Refactor backend for membership tiers

- [x] Create new Cassandra schema for Wire support tiers
- [x] Create repository and manager classes
- [x] Create delegate and polyfill classes
- [x] Hook polyfill onto User export()
- [x] New endpoints to create/read/update/delete Support Tiers
- [x] Store selected Support Tier on Cassandra and ElasticSearch when creating/editing an entity

Story points: 3.0
Determine automatic upload status of channel on youtube importer

We need a way to determine how to populate the 'New Youtube Videos' checkbox on [this mockup](https://design.minds.com/hosted/web/michael/front%23-youtube-migration/#artboard7)

* [ ]  Add a new field to User entity

![image](/uploads/e14019cfa991d26a1660e4667757286f/image.png)

This should enable scraping of all the existing videos on the channel. It should also enable the web hook pub sub so that all new videos coming in get automatically imported.

Story points: 4.0
Most recent token transaction not being counted towards running total

See screenshot.

The most recent token transaction is not being counted towards the running balance.

![Screen_Shot_2020-04-14_at_1.09.54_PM](/uploads/2aeb9c1d75d47a88a25368b274182db7/Screen_Shot_2020-04-14_at_1.09.54_PM.png)

Story points: 1.0
Clicking on a notification should close the notification tab on mobile web

iOS Safari, iPhone 7

Steps to replicate:

1. Go to Minds on mobile browser
2. Open notification drop down
3. Click notification
4. Hard to tell anything happened

It would be much better if the notification drop down minimized when you clicked something, but ONLY for mobile web. This is not an issue on regular web as you can see behind the drop down clearly.

Story points: 1.0
Offchain limit being hit by onchain transaction

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Offchain limit causing onchain boosts to fail

https://www.minds.com/newsfeed/1096514796905795584?focusedCommentUrn=urn:comment:1096514796905795584:0:0:0:1096821918856290304

### Steps to reproduce

Will require some investigation but presumably:
1. Hit offchain limit
2. Try to boost onchain

It could be something to do with previous selections and state getting mixed up also.

### Platform information 

(Browser, device, system stats, screen size)

### What is the current *bug* behavior?

Error is shown

### What is the expected *correct* behavior?

Error should not be shown for onchain boosts

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

Probably something similar to https://gitlab.com/minds/engine/-/merge_requests/505/diffs

Story points: 4.0
Non group members can't view public group descriptions

### Summary

Unverified accounts can view groups but can not see group descriptions

### Steps to reproduce

1. Create a new unverified channel
2. View a group, group description will not display

### Platform information 

Chrome, firefox

### What is the current *bug* behavior?

Group descriptions are not displayed for unverified channels

### What is the expected *correct* behavior?

Any user should be able to see a group description

### Relevant logs and/or screenshots

![image](/uploads/9f1b3d74a2183f83c743871f157d8046/image.png)

Story points: 2.0
Give 90 days free Pro to YT creators over 1k subs

We can very easily tell if a youtube user has over 1k subs. We just need to handle how that gets applied.

When a user links up their YT account (the first time and only one time per account), we need to give them a Pro subscription that expires a year out. 

For videos less than 1k subscribers who enable importing automatically, we need to award their account if they cross that threshold.

Need to create 2 emails. One that informs them they got it. One that gets them to buy at end of trial

Story points: 2.0
Rollout 2020 Top Discovery Feed Not working

### Summary

Top Discovery Feed doesn't work on the 2020 Rollout

### Steps to reproduce

1. Go to discovery
2. Choose a trending tag
3. It defaults to top and never loads

### Platform information 

Browsers

### What is the current *bug* behavior?

Top discover feed is the default feed option in rollout2020, but it is broken

### What is the expected *correct* behavior?

Top discovery feed should work as the default option

### Relevant logs and/or screenshots

This query triggers the issue:
https://www.minds.com/discovery/search?q=%23coronavirus&f=top

![image](/uploads/39db030ec7d9ceb087716f1e8fcf584f/image.png)

Story points: 4.0
Infinite loading circle for older channel blogs

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Found at least one situation this error can occur. There may be others and 

All but one of these errors I think is relatedd to this issue:

https://sentry.io/organizations/minds-inc/issues/?end=2020-03-24T23%3A59%3A59&query=user.id%3A100000000000035825&start=2020-03-23T00%3A00%3A00&utc=true

### Steps to reproduce

1. Go to `https://www.minds.com/truth`.
2. Open XHRs.
3. Scroll right down.
3. Notice the loading hangs when at the bottom.
4. Wait for request to timeout, see 500.

### Platform information 

Chromium / Ubuntu

### What is the current *bug* behavior?

Infinite loading.

### What is the expected *correct* behavior?

Content should load.

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

Sentry Issue: [ENGINE-HF](https://sentry.io/organizations/minds-inc/issues/1306731741/?referrer=gitlab_integration)

```
ErrorException: Maximum execution time of 30 seconds exceeded
  File "/lib/elgglib.php", line 951, in fatalErrorShutdownHandler
    \Sentry\captureLastError();
```

Story points: 4.0
When a user clicks transfer, register their YT video for transcoding

The api `api/v3/media/youtube-importer/transfer` should take ids and queue them up for transcoding. 

PUT should queue / requeue the video for transcoding (where each user can only have one video instance)

DELETE should Cancel / delete the underlying entity before it's transcoded
??? do we want to provide the user's ability to delete previously imported videos on this screen @markeharding 

When the user clicks all, this will need to be a batched job that creates video records for all videos on their channel and then queues them up for processing over (# of videos / 10) days

This will be a fixed daily limit of 10 at the MVP, but then be based on their number of subscribers later. 

When the user transfers all

We'll need to extend the video entity to track:

The Video string id for youtube
The transcoder status

Mapped to elastic search 

Then we should be able to query elastic search when the queue runner run.

A queue runner job should run to a give user and a give timespan. This one should run through the elastic search and find up to the user's daily transcode limit and queue them up for transcoding. It should create the video, set the status and then publish the video only when it's done transcoding (because a user could have many videos on their channel and scheduled them all for importing). Note it should only schedule up to the allowed daily allotment (oldest first).

Up to the configured limit, queue up transcoder requests.

For scale reasons, we don't want to write anything other than the video string and the transcoder status (so we know what needs to be processed)

When the video is transcoded, publish the video

Wht

### Warning: There is a youtube quota that is variable based on our usage.
I am hoping this won't be a problem because we can download the videos directly from the extracted information request
https://developers.google.com/youtube/v3/getting-started#calculating-quota-usage


- [x] `youtube_id` and `youtube_channel_id` flag on Entities/Video objects
- [ ] `youtube_id` and `youtube_channel_id` keyword field for elasticsearch (only index if exists, empty strings cause issues)
- [ ] Do a bulk terms query of the youtube_channel_id to get a list of all there transcoded videos
- [ ] Consider adding a `youtube_importer_queued` field for ease in running daily jobs?

Story points: 16.0
Implement the youtube oauth flow and store the auth tokens on the api

The backend needs to be able to proxy requests to the youtube services for a user who authorizes their account

- [ ] Use the new PSR7 router
- [ ] Place as a new module under `Core/Media/YoutubeImporter`
- [ ] Provide an endpoint for ```/v3/media/youtube-importer/auth/:user_guid```

PUT Create or update the user object with their youtube authorization token
DELETE delete the token from the user's object

Story points: 4.0
Implement the youtube sdk on the backend

https://developers.google.com/youtube/v3/quickstart/php

GET `/api/v3/media/youtube-importer/import/videos` should return a list of available videos from youtube and any videos that are in process / queued
Each video should return the title, created date, number of views from YT
The response should include the user's daily limit, the number of queued and the number of videos currently transferring. 


GET `/api/v3/media/youtube-importer/videos?status=transferred` should return videos that have been transferred. Probably a version of the user's channel feed with the video filter and an extension that allows for filtering on imported videos by source.

Both gets should be paginated and support infinite scrolling

The backend should never return the user's YT oauth information, but it must return a "yt_connected" timestamp for accounts that have successfully authed and stored their token.

The user settings data model must be extended to allow the settings of the "yt_auto_tranfer" flag

- [x] Add the google libraries for the PHP sdk to our compose stack
- [ ] Setup and configure the api keys and secrets and review 
- [ ] @markeharding will need to provide and configure the keys
- [x] Setup a Core\Media\YoutubeImporter module that interfaces with a set of functions so we can add other video imports to the same flow.
- [x] Add in a "yt-importer" feature flag on the backend. Even though the backend is all new restful endpoints, this will control the settings on the clients
- [x] Endpoints for getting video lists
- [ ] Updates to the user config (tokens, auto import settings)

Story points: 4.0
Apply the new email template to our existing system emails

We need to apply the new template to these emails and audit the ones we actually send. Those emails are listed on #1371 

Probably worth cleaning up our old templates and removing all the old emails 

This should mostly be changed the underlying template and verifying that emails look correct. There shouldn't be a lot of code changes until we start redesigning the emails individually

@ottman @jotto141 @markeharding can you help confirm the list of emails we send and want fixed?

- [ ] Retrofit our existing emails
- [ ] Refactor and cleanup the old emails so we can get them all into once place
- [ ] Delete the old emails we are no longer using
- [ ] Audit and verify our existing emails with the new template.
- [ ] Bonus points for setting up a cli utility that allows us to send them on demand for both test and admin experience.

https://design.minds.com/hosted/other/design%23-email/


**Spreadsheet**
https://docs.google.com/spreadsheets/d/1Dv3FGgOW3Md1xr1z-PKKrZ_7TgCpga8DuBehw5eOgd8/edit#gid=0

Story points: 8.0
Apply the new template to the Welcome Email

When a new user sets up an account, we send them a welcome email on whether or not they have completed the onboarding process.

We're going to need to retrofit the old emails we send to fit the new designs

https://design.minds.com/hosted/other/email/

The suggested channels partial will need to be revisited to support these new lists so we can start sending out dynamic content in a consistent manner

https://design.minds.com/hosted/other/email/#artboard2

- [ ] Redesign the welcome emails to use the new template
- [ ] Make sure the email complete and email incomplete emails still work with the new onboarding process

Story points: 4.0
Offchain balance being reduced by onchain spending

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

I selected OnChain boost, I went through the whole gas fee process in MetaMask, and then got the error message about the Offchain boosts on Minds. So the transaction went through on MetaMask, and was rejected by Minds

### Steps to reproduce

(How one can reproduce the issue - this is very important)

### Platform information 

Firefox / Manjaro

### What is the current *bug* behavior?

It seems

1. The member made 1 on-chain transaction.
2. It went through metamask - **no error was shown**.
3. The transaction is dispatched to be mined onto the Ethereum network by Metamask.
4. The user now is shown the boost window with the error.
`Exceeded maximum of ".$maxDaily." offchain tokens per 24 hours`.
5. Transaction succeeds on Ethereum.
6. Boost is not visible in boost console, but tokens are gone. 

### What is the expected *correct* behavior?

That error should not be showing for onchain transactions - if the TX is valid it should dispatch and save the boost to the db.

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 4.0