Notification bug fixes and new upload endpoint switcher on d.tube

dtube upload endpoint notif.png

Repository

https://github.com/dtube/dtube

Fixing empty notifications

Pull request: https://github.com/dtube/dtube/pull/104

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:

Before
After

New upload endpoint switcher

Pull request: https://github.com/dtube/dtube/pull/103

This new feature mainly adds the ability to utilize @onelovedtube upload servers on d.tube 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 cluster.d.tube and uploader.oneloved.tube. If nothing is done to the dropdown menu, the video will be uploaded to the default upload server as usual. If uploader.oneloved.tube 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

https://github.com/techcoderx

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
8 Comments