fix(server,web): correctly show album level like (#4916)

* fix: like in global activity

* refactor: rename isGlobal to ReactionLevel.Album

* chore: open api

* chore: e2e test for album vs comment duplicate like checking

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
martin 2023-11-10 03:32:31 +01:00 committed by GitHub
parent 986bbfa831
commit 92ec1ce77f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 262 additions and 26 deletions

View file

@ -39,6 +39,7 @@
export let assetType: AssetTypeEnum | undefined = undefined;
export let albumOwnerId: string;
export let disabled: boolean;
export let isLiked: ActivityResponseDto | null;
let textArea: HTMLTextAreaElement;
let innerHeight: number;
@ -105,7 +106,7 @@
reactions.splice(index, 1);
showDeleteReaction.splice(index, 1);
reactions = reactions;
if (reaction.type === 'like' && reaction.user.id === user.id) {
if (isLiked && reaction.type === 'like' && reaction.id == isLiked.id) {
dispatch('deleteLike');
} else {
dispatch('deleteComment');