CHANNEL_UNSUBSCRIBE: handle colon vs. hash uris (#706)
## Ticket 644 investigate following vs subscription preference data ## Issue - iOS app uses colon for following/subscriptions. - Front-end code handled the "colon vs. hash" for CHANNEL_SUBSCRIBE, but not for CHANNEL_UNSUBSCRIBE
This commit is contained in:
parent
73c3737ef4
commit
5dc1d416ef
1 changed files with 4 additions and 2 deletions
|
@ -48,12 +48,14 @@ export default handleActions(
|
||||||
},
|
},
|
||||||
[ACTIONS.CHANNEL_UNSUBSCRIBE]: (state: SubscriptionState, action): SubscriptionState => {
|
[ACTIONS.CHANNEL_UNSUBSCRIBE]: (state: SubscriptionState, action): SubscriptionState => {
|
||||||
const subscriptionToRemove: Subscription = action.data;
|
const subscriptionToRemove: Subscription = action.data;
|
||||||
|
|
||||||
const newSubscriptions = state.subscriptions
|
const newSubscriptions = state.subscriptions
|
||||||
.slice()
|
.slice()
|
||||||
.filter((subscription) => subscription.uri !== subscriptionToRemove.uri);
|
.filter((subscription) => !isURIEqual(subscription.uri, subscriptionToRemove.uri));
|
||||||
|
|
||||||
const newFollowing = state.following
|
const newFollowing = state.following
|
||||||
.slice()
|
.slice()
|
||||||
.filter((subscription) => subscription.uri !== subscriptionToRemove.uri);
|
.filter((subscription) => !isURIEqual(subscription.uri, subscriptionToRemove.uri));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|
Loading…
Reference in a new issue