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>
|
||||
</section>
|
||||
<div className="card__actions">
|
||||
<SubscribeButton uri={permanentUrl} channelName={name} />
|
||||
<SubscribeButton uri={`lbry://${permanentUrl}`} channelName={name} />
|
||||
<ViewOnWebButton claimId={claimId} claimName={name} />
|
||||
</div>
|
||||
<section className="card__content">{contentList}</section>
|
||||
|
|
|
@ -315,6 +315,13 @@ export const doChannelSubscribe = (subscription: Subscription) => (
|
|||
} = getState();
|
||||
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({
|
||||
type: ACTIONS.CHANNEL_SUBSCRIBE,
|
||||
data: subscription,
|
||||
|
|
Loading…
Reference in a new issue