Merge pull request #1969 from Bnyro/fix-unauth-subs

Fix unsubscribing without account
This commit is contained in:
Bnyro 2023-01-10 19:33:09 +01:00 committed by GitHub
commit 28abc1087e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ const mixin = {
handleLocalSubscriptions(channelId) {
var localSubscriptions = this.getLocalSubscriptions() ?? [];
if (localSubscriptions.includes(channelId))
localSubscriptions.splice(localSubscriptions.indexOf(channelId));
localSubscriptions.splice(localSubscriptions.indexOf(channelId), 1);
else localSubscriptions.push(channelId);
// Sort for better cache hits
localSubscriptions.sort();