fix: support empty updatedAt in fedi
This commit is contained in:
parent
17c7d889af
commit
b453628fba
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ const BODY = {
|
|||
const schema = z.object({
|
||||
id: z.string(),
|
||||
createdAt: z.string(),
|
||||
updatedAt: z.string(),
|
||||
updatedAt: z.string().nullable().optional(),
|
||||
text: z.nullable(z.string()),
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export async function fetchLastSeen() {
|
|||
res.push({
|
||||
source: 'fedi',
|
||||
sourceLink: 'https://very.stupid.fish/@teidesu',
|
||||
time: new Date(fediData.updatedAt).getTime(),
|
||||
time: new Date(fediData.updatedAt ?? fediData.createdAt).getTime(),
|
||||
text: fediData.text?.slice(0, 40) || '[no text]',
|
||||
link: `https://very.stupid.fish/notes/${fediData.id}`,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue