Add streak.expires to the API

This commit is contained in:
Alex Gleason 2025-02-15 23:23:04 -06:00
parent 222bf84eab
commit a9744ff4ad
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 0 deletions

View file

@ -49,6 +49,7 @@ export interface MastodonAccount {
days: number;
start: string | null;
end: string | null;
expires: string | null;
};
};
domain?: string;

View file

@ -121,6 +121,7 @@ function renderAccount(event: Omit<DittoEvent, 'id' | 'sig'>, opts: ToAccountOpt
days: streakDays,
start: streakStart ? nostrDate(streakStart).toISOString() : null,
end: streakEnd ? nostrDate(streakEnd).toISOString() : null,
expires: streakEnd ? nostrDate(streakEnd + streakWindow).toISOString() : null,
},
},
domain: parsed05?.domain,