View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/671 Closes #726 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
de9b99c937
20 changed files with 478 additions and 104 deletions
|
|
@ -23,6 +23,17 @@ type Quote =
|
|||
hasPoll: true
|
||||
});
|
||||
|
||||
type PureRenote =
|
||||
Renote & {
|
||||
text: null,
|
||||
cw: null,
|
||||
replyId: null,
|
||||
hasPoll: false,
|
||||
fileIds: {
|
||||
length: 0,
|
||||
},
|
||||
};
|
||||
|
||||
export function isRenote(note: MiNote): note is Renote {
|
||||
return note.renoteId != null;
|
||||
}
|
||||
|
|
@ -36,6 +47,10 @@ export function isQuote(note: Renote): note is Quote {
|
|||
note.fileIds.length > 0;
|
||||
}
|
||||
|
||||
export function isPureRenote(note: MiNote): note is PureRenote {
|
||||
return isRenote(note) && !isQuote(note);
|
||||
}
|
||||
|
||||
type PackedRenote =
|
||||
Packed<'Note'> & {
|
||||
renoteId: NonNullable<Packed<'Note'>['renoteId']>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue