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.
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
Here is the result:
New upload endpoint switcher
Pull request: https://github.com/dtube/dtube/pull/103
A dropdown menu has been added above the video dropzone. Currently, it has 2 options, which are the default
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:
- If the user is logged in with Steem,
/loginGET API call is attempted to obtain the encrypted memo, to be decrypted using posting key.
- 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
/logincbPOST API call to obtain the access token.
- The returned
access_tokenis 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).
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.