Merge branch 'admin-reports-api' into 'main'

Return from renderReport() in case pubkey is undefined

See merge request soapbox-pub/ditto!224
This commit is contained in:
Alex Gleason 2024-05-06 18:06:53 +00:00
commit 120003c5c8
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ async function renderReport(reportEvent: DittoEvent, profile: DittoEvent) {
const statusIds = reportEvent.tags.filter(([name]) => name === 'e').map((tag) => tag[1]) ?? [];
const reportedPubkey = reportEvent.tags.find(([name]) => name === 'p')?.[1]!;
const reportedPubkey = reportEvent.tags.find(([name]) => name === 'p')?.[1];
if (!reportedPubkey) return;
return {
id: reportEvent.id,