fix subscribe uri on channel pages
This commit is contained in:
parent
32d110cb1f
commit
639f99555f
2 changed files with 8 additions and 1 deletions
|
@ -87,7 +87,7 @@ class ChannelPage extends React.PureComponent<Props> {
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<div className="card__actions">
|
<div className="card__actions">
|
||||||
<SubscribeButton uri={permanentUrl} channelName={name} />
|
<SubscribeButton uri={`lbry://${permanentUrl}`} channelName={name} />
|
||||||
<ViewOnWebButton claimId={claimId} claimName={name} />
|
<ViewOnWebButton claimId={claimId} claimName={name} />
|
||||||
</div>
|
</div>
|
||||||
<section className="card__content">{contentList}</section>
|
<section className="card__content">{contentList}</section>
|
||||||
|
|
|
@ -315,6 +315,13 @@ export const doChannelSubscribe = (subscription: Subscription) => (
|
||||||
} = getState();
|
} = getState();
|
||||||
const { share_usage_data: isSharingData } = daemonSettings;
|
const { share_usage_data: isSharingData } = daemonSettings;
|
||||||
|
|
||||||
|
const subscriptionUri = subscription.uri;
|
||||||
|
if (!subscriptionUri.startsWith('lbry://')) {
|
||||||
|
throw Error(
|
||||||
|
`Subscription uris must inclue the "lbry://" prefix.\nTried to subscribe to ${subscriptionUri}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CHANNEL_SUBSCRIBE,
|
type: ACTIONS.CHANNEL_SUBSCRIBE,
|
||||||
data: subscription,
|
data: subscription,
|
||||||
|
|
Loading…
Add table
Reference in a new issue