Notification bug fixes and new upload endpoint switcher on

dtube upload endpoint notif.png


Fixing empty notifications

Pull request:

Whenever a user gets mentioned in both unpromoted and promoted post, or received a vote as Avalon leader node owner, the notification that the user will receive will not render properly. Mentions in promoted posts and leader vote notifications appeared to be blank while notification for mentions in unpromoted posts does not link to any author or video link.

Screenshot 20190718 at 7.34.42 PM.png

This is fixed by adding the missing HTML code in notification.html to render notifications for transaction types 1 and 13. For notifications for transaction type 4 (mentions), the author of the post should be referred to as tx.sender instead of author.

Here is the result:


New upload endpoint switcher

Pull request:

This new feature mainly adds the ability to utilize @onelovedtube upload servers on without the need to leave the website to use the uploader on another domain.

Screenshot 20190718 at 9.15.44 PM.png

A dropdown menu has been added above the video dropzone. Currently, it has 2 options, which are the default and If nothing is done to the dropdown menu, the video will be uploaded to the default upload server as usual. If gets selected, a few things happen:

  1. If the user is logged in with Steem, /login GET API call is attempted to obtain the encrypted memo, to be decrypted using posting key.
  2. Provided that the logged in Steem account is in the whitelist, encrypted memo is returned then decrypted using the private posting key. The resulting string is sent back to server with /logincb POST API call to obtain the access token.
  3. The returned access_token is then used to authenticate all upload requests, including video, thumbnail and subtitle uploads.

If everything went well, a checkmark will appear on the dropdown box, and all upload calls will be made to the selected upload server instead of the default. If there are any errors, it will fall back to the default upload endpoint (it will return to the unselected state).

Kapture 20190718 at 21.27.57.gif

More details of how the auth system works can be found here.

New upload endpoints may be easily added to the list by updating the thirdPartyUploadEndpoints array in settings.js. Some minor code changes may be needed depending on the backend code that is in place.

Github account

3 columns
2 columns
1 column