Merge pull request #119 from lbryio/invites-canonical-urls

canonical urls for invite links
This commit is contained in:
Akinwale Ariwodola 2020-02-17 06:14:46 +01:00 committed by GitHub
commit fa25789855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 15 additions and 13 deletions

4
package-lock.json generated
View file

@ -7067,8 +7067,8 @@
} }
}, },
"lbry-redux": { "lbry-redux": {
"version": "github:lbryio/lbry-redux#acbbc66b78566da11faa0fa8c65b44a8d4302c5e", "version": "github:lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"from": "github:lbryio/lbry-redux#acbbc66b78566da11faa0fa8c65b44a8d4302c5e", "from": "github:lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"requires": { "requires": {
"proxy-polyfill": "0.1.6", "proxy-polyfill": "0.1.6",
"reselect": "^3.0.0", "reselect": "^3.0.0",

View file

@ -12,7 +12,7 @@
"base-64": "^0.1.0", "base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0", "@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3", "gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#acbbc66b78566da11faa0fa8c65b44a8d4302c5e", "lbry-redux": "lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c", "lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
"lodash": ">=4.17.11", "lodash": ">=4.17.11",
"merge": ">=1.2.1", "merge": ">=1.2.1",

View file

@ -19,11 +19,11 @@ const select = state => ({
const perform = dispatch => ({ const perform = dispatch => ({
notify: data => dispatch(doToast(data)), notify: data => dispatch(doToast(data)),
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)), createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)), getSync: (password, callback) => dispatch(doGetSync(password, callback)),
}); });
export default connect( export default connect(
select, select,
perform perform,
)(ChannelSelector); )(ChannelSelector);

View file

@ -9,10 +9,10 @@ const select = state => ({
}); });
const perform = dispatch => ({ const perform = dispatch => ({
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
}); });
export default connect( export default connect(
select, select,
perform perform,
)(DrawerContent); )(DrawerContent);

View file

@ -18,7 +18,7 @@ const select = (state, props) => ({
const perform = dispatch => ({ const perform = dispatch => ({
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)), abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
fetchSubCount: claimId => dispatch(doFetchSubCount(claimId)), fetchSubCount: claimId => dispatch(doFetchSubCount(claimId)),
popDrawerStack: () => dispatch(doPopDrawerStack()), popDrawerStack: () => dispatch(doPopDrawerStack()),
setSortByItem: item => dispatch(doSetSortByItem(item)), setSortByItem: item => dispatch(doSetSortByItem(item)),
@ -27,5 +27,5 @@ const perform = dispatch => ({
export default connect( export default connect(
select, select,
perform perform,
)(ChannelPage); )(ChannelPage);

View file

@ -42,7 +42,7 @@ const perform = dispatch => ({
notify: data => dispatch(doToast(data)), notify: data => dispatch(doToast(data)),
clearChannelFormState: () => dispatch(doClearChannelFormState()), clearChannelFormState: () => dispatch(doClearChannelFormState()),
createChannel: (name, amount, optionalParams) => dispatch(doCreateChannel(name, amount, optionalParams)), createChannel: (name, amount, optionalParams) => dispatch(doCreateChannel(name, amount, optionalParams)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)), getSync: (password, callback) => dispatch(doGetSync(password, callback)),
updateChannel: params => dispatch(doUpdateChannel(params)), updateChannel: params => dispatch(doUpdateChannel(params)),
updateChannelFormState: data => dispatch(doUpdateChannelFormState(data)), updateChannelFormState: data => dispatch(doUpdateChannelFormState(data)),

View file

@ -82,7 +82,7 @@ const perform = dispatch => ({
fetchFileInfo: uri => dispatch(doFetchFileInfo(uri)), fetchFileInfo: uri => dispatch(doFetchFileInfo(uri)),
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)), fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
fetchMyClaims: () => dispatch(doFetchClaimListMine()), fetchMyClaims: () => dispatch(doFetchClaimListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
fetchViewCount: claimId => dispatch(doFetchViewCount(claimId)), fetchViewCount: claimId => dispatch(doFetchViewCount(claimId)),
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)), fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
notify: data => dispatch(doToast(data)), notify: data => dispatch(doToast(data)),

View file

@ -32,7 +32,7 @@ const select = state => ({
}); });
const perform = dispatch => ({ const perform = dispatch => ({
fetchChannelListMine: () => dispatch(doFetchChannelListMine()), fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
fetchInviteStatus: () => dispatch(doFetchInviteStatus()), fetchInviteStatus: () => dispatch(doFetchInviteStatus()),
inviteNew: email => dispatch(doUserInviteNew(email)), inviteNew: email => dispatch(doUserInviteNew(email)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_INVITES)), pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_INVITES)),

View file

@ -68,7 +68,8 @@ class InvitesPage extends React.PureComponent {
}; };
getLinkForChannel = channel => { getLinkForChannel = channel => {
const { claimId, claimName } = parseURI(channel.permanent_url); const parsedUrl = channel.canonical_url ? parseURI(channel.canonical_url) : parseURI(channel.permanent_url);
const { claimId, claimName } = parsedUrl;
return `https://lbry.tv/$/invite/${claimName}:${claimId}`; return `https://lbry.tv/$/invite/${claimName}:${claimId}`;
}; };

View file

@ -10,6 +10,7 @@ const specialRouteMap = {
about: Constants.DRAWER_ROUTE_ABOUT, about: Constants.DRAWER_ROUTE_ABOUT,
allContent: Constants.DRAWER_ROUTE_TRENDING, allContent: Constants.DRAWER_ROUTE_TRENDING,
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR, channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
invite: Constants.DRAWER_ROUTE_INVITES,
invites: Constants.DRAWER_ROUTE_INVITES, invites: Constants.DRAWER_ROUTE_INVITES,
library: Constants.DRAWER_ROUTE_MY_LBRY, library: Constants.DRAWER_ROUTE_MY_LBRY,
publish: Constants.DRAWER_ROUTE_PUBLISH, publish: Constants.DRAWER_ROUTE_PUBLISH,