Unverified Commit fa257898 authored by Akinwale Ariwodola's avatar Akinwale Ariwodola Committed by GitHub
Browse files

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

canonical urls for invite links
parents 514e077f 76938d33
...@@ -7067,8 +7067,8 @@ ...@@ -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",
......
...@@ -19,11 +19,11 @@ const select = state => ({ ...@@ -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);
...@@ -9,10 +9,10 @@ const select = state => ({ ...@@ -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);
...@@ -18,7 +18,7 @@ const select = (state, props) => ({ ...@@ -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 => ({ ...@@ -27,5 +27,5 @@ const perform = dispatch => ({
export default connect( export default connect(
select, select,
perform perform,
)(ChannelPage); )(ChannelPage);
...@@ -42,7 +42,7 @@ const perform = dispatch => ({ ...@@ -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)),
......
...@@ -82,7 +82,7 @@ const perform = dispatch => ({ ...@@ -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)),
......
...@@ -32,7 +32,7 @@ const select = state => ({ ...@@ -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)),
......
...@@ -68,7 +68,8 @@ class InvitesPage extends React.PureComponent { ...@@ -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}`;
}; };
......
...@@ -10,6 +10,7 @@ const specialRouteMap = { ...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment