From cda298c8223851d50edcd2761391d4ddb8932ed1 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 23 Apr 2020 11:17:52 +0300 Subject: [PATCH] remove unused mutation and test for it --- src/modules/users.js | 4 ---- .../entity_normalizer/entity_normalizer.service.js | 9 --------- test/unit/specs/modules/users.spec.js | 14 -------------- 3 files changed, 27 deletions(-) diff --git a/src/modules/users.js b/src/modules/users.js index 591d4634c0..6b19fc97d7 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -83,10 +83,6 @@ const unmuteDomain = (store, domain) => { } export const mutations = { - setMuted (state, { user: { id }, muted }) { - const user = state.usersObject[id] - set(user, 'muted', muted) - }, tagUser (state, { user: { id }, tag }) { const user = state.usersObject[id] const tags = user.tags || [] diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 66a7a8b75f..7237fdfc0a 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -73,15 +73,6 @@ export const parseUser = (data) => { output.background_image = data.pleroma.background_image output.token = data.pleroma.chat_token - if (relationship && !relationship) { - output.follows_you = relationship.followed_by - output.requested = relationship.requested - output.following = relationship.following - output.statusnet_blocking = relationship.blocking - output.muted = relationship.muting - output.showing_reblogs = relationship.showing_reblogs - output.subscribed = relationship.subscribing - } if (relationship) { output.relationship = relationship } diff --git a/test/unit/specs/modules/users.spec.js b/test/unit/specs/modules/users.spec.js index eeb7afefe0..670acfc822 100644 --- a/test/unit/specs/modules/users.spec.js +++ b/test/unit/specs/modules/users.spec.js @@ -18,20 +18,6 @@ describe('The users module', () => { expect(state.users).to.eql([user]) expect(state.users[0].name).to.eql('Dude') }) - - it('sets a mute bit on users', () => { - const state = cloneDeep(defaultState) - const user = { id: '1', name: 'Guy' } - - mutations.addNewUsers(state, [user]) - mutations.setMuted(state, { user, muted: true }) - - expect(user.muted).to.eql(true) - - mutations.setMuted(state, { user, muted: false }) - - expect(user.muted).to.eql(false) - }) }) describe('findUser', () => {