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:
infinite-persistence 2022-01-17 05:39:06 -08:00 committed by GitHub
parent 73c3737ef4
commit 5dc1d416ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,12 +48,14 @@ export default handleActions(
},
[ACTIONS.CHANNEL_UNSUBSCRIBE]: (state: SubscriptionState, action): SubscriptionState => {
const subscriptionToRemove: Subscription = action.data;
const newSubscriptions = state.subscriptions
.slice()
.filter((subscription) => subscription.uri !== subscriptionToRemove.uri);
.filter((subscription) => !isURIEqual(subscription.uri, subscriptionToRemove.uri));
const newFollowing = state.following
.slice()
.filter((subscription) => subscription.uri !== subscriptionToRemove.uri);
.filter((subscription) => !isURIEqual(subscription.uri, subscriptionToRemove.uri));
return {
...state,