mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: issue reaction response updated (#3951)
This commit is contained in:
parent
d25fcfdd88
commit
cbe5d9a047
@ -1,7 +1,7 @@
|
||||
export type TIssueReaction = {
|
||||
actor_id: string;
|
||||
actor: string;
|
||||
id: string;
|
||||
issue_id: string;
|
||||
issue: string;
|
||||
reaction: string;
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ export const IssueReaction: FC<TIssueReaction> = observer((props) => {
|
||||
const reactionUsers = (reactionIds?.[reaction] || [])
|
||||
.map((reactionId) => {
|
||||
const reactionDetails = getReactionById(reactionId);
|
||||
return reactionDetails ? getUserDetails(reactionDetails.actor_id)?.display_name : null;
|
||||
return reactionDetails ? getUserDetails(reactionDetails.actor)?.display_name : null;
|
||||
})
|
||||
.filter((displayName): displayName is string => !!displayName);
|
||||
|
||||
|
@ -84,7 +84,7 @@ export class IssueReactionStore implements IIssueReactionStore {
|
||||
if (reactions?.[reaction])
|
||||
reactions?.[reaction].map((reactionId) => {
|
||||
const currentReaction = this.getReactionById(reactionId);
|
||||
if (currentReaction && currentReaction.actor_id === userId) _userReactions.push(currentReaction);
|
||||
if (currentReaction && currentReaction.actor === userId) _userReactions.push(currentReaction);
|
||||
});
|
||||
});
|
||||
|
||||
@ -151,7 +151,7 @@ export class IssueReactionStore implements IIssueReactionStore {
|
||||
) => {
|
||||
try {
|
||||
const userReactions = this.reactionsByUser(issueId, userId);
|
||||
const currentReaction = find(userReactions, { actor_id: userId, reaction: reaction });
|
||||
const currentReaction = find(userReactions, { actor: userId, reaction: reaction });
|
||||
|
||||
if (currentReaction && currentReaction.id) {
|
||||
runInAction(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user