mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 03:03:08 +02:00
merge: fix: incorrect type for quote property (!480)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/480 Closes #401 Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
7bdaf8f649
3 changed files with 3 additions and 3 deletions
|
@ -278,7 +278,7 @@ export class MastoConverters {
|
||||||
reactions: status.emoji_reactions,
|
reactions: status.emoji_reactions,
|
||||||
emoji_reactions: status.emoji_reactions,
|
emoji_reactions: status.emoji_reactions,
|
||||||
bookmarked: false,
|
bookmarked: false,
|
||||||
quote: isQuote ? await this.convertReblog(status.reblog) : false,
|
quote: isQuote ? await this.convertReblog(status.reblog) : null,
|
||||||
// optional chaining cannot be used, as it evaluates to undefined, not null
|
// optional chaining cannot be used, as it evaluates to undefined, not null
|
||||||
edited_at: note.updatedAt ? note.updatedAt.toISOString() : null,
|
edited_at: note.updatedAt ? note.updatedAt.toISOString() : null,
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Entity {
|
||||||
language: string | null
|
language: string | null
|
||||||
pinned: boolean | null
|
pinned: boolean | null
|
||||||
emoji_reactions: Array<Reaction>
|
emoji_reactions: Array<Reaction>
|
||||||
quote: Status | boolean
|
quote: Status | boolean | null
|
||||||
bookmarked: boolean
|
bookmarked: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace MisskeyAPI {
|
||||||
pinned: null,
|
pinned: null,
|
||||||
emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [],
|
emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [],
|
||||||
bookmarked: false,
|
bookmarked: false,
|
||||||
quote: n.renote && n.text ? note(n.renote, n.user.host ? n.user.host : host ? host : null) : false
|
quote: n.renote && n.text ? note(n.renote, n.user.host ? n.user.host : host ? host : null) : null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue