WIP: Fixing mutes not persisting with Pleroma-BE
Fixes pleroma#211 (closed)
Changed the way mutes are stored - instead of storing them in user
they are stored as a map screen_name -> isMuted
in config, the same way color/highlight options are stored in !285 (merged). Reasoning behind this is that right now muting is stored in user
and user
itself is stored in a huge array of users alongside with a lot of other metadata (background URI, nicknames, etc), persisting all that data seems like a bad idea, especially since local storage is rather limited in terms of space, and storing only part of that (like, state.users.usersObject.*.muted
or something) seems like a lot of extra work for no good reason.
In future, if both this and !285 (merged) get merged we probably should keep a separate config entry for all user-related customizations, instead of several separate entries.
Current implementation should work with BEs that support server-side mutes, but i haven't tested that - i can see LS taking priority over server-provided list while losing sync with it. Maybe i'll try doing blind theoretical fixes.
Testing on compatible BE is appreciated!