CatCatNya / catstodon

The Fediverse server that meows at you - a fork of glitch-soc Mastodon
https://git.kescher.at/CatCatNya/catstodon
GNU Affero General Public License v3.0
17 stars 3 forks source link

Fix most backend issues #4

Closed Plastikmensch closed 1 year ago

Plastikmensch commented 1 year ago

Fixes multiple occurrences of looking for :shortcode: in the database, preventing Undo activities to be processed. Added handling for Undo with Misskey reactions. Fixes an issue where me was true when a remote reaction had the same shortcode as an already present reaction. Added custom_emoji to reacted? to be able to differentiate between reactions with the same shortcode but different emojis.

Don't know if you were already working on this or not, but I thought I offer my solution. Some of it could probably be optimised, but I worked multiple days on this and I'm tired.

Outstanding issues: Because reactions from the same account with the same name, but different custom emojis can exist, it is possible for sidekiq to throw:

ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_status_reactions_on_account_id_and_status_id"

for remote reactions and Duplicate record for local reactions.