mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[mastodon-client] Fix note favorite status
This commit is contained in:
parent
0aeeeca076
commit
f906ec1d55
@ -43,6 +43,8 @@ export class NoteConverter {
|
||||
noteId: note.id,
|
||||
}) : null;
|
||||
|
||||
const isFavorited = Promise.resolve(reaction).then(p => !!p);
|
||||
|
||||
const isReblogged = user ? Notes.exist({
|
||||
where: {
|
||||
userId: user.id,
|
||||
@ -98,7 +100,7 @@ export class NoteConverter {
|
||||
reblogs_count: note.renoteCount,
|
||||
favourites_count: reactionCount,
|
||||
reblogged: isReblogged,
|
||||
favourited: !!reaction,
|
||||
favourited: isFavorited,
|
||||
muted: isMuted,
|
||||
sensitive: files.then(files => files.length > 0 ? files.some((f) => f.isSensitive) : false),
|
||||
spoiler_text: note.cw ? note.cw : "",
|
||||
|
Loading…
Reference in New Issue
Block a user