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:
commit
120003c5c8
|
@ -11,7 +11,8 @@ async function renderReport(reportEvent: DittoEvent, profile: DittoEvent) {
|
||||||
|
|
||||||
const statusIds = reportEvent.tags.filter(([name]) => name === 'e').map((tag) => tag[1]) ?? [];
|
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 {
|
return {
|
||||||
id: reportEvent.id,
|
id: reportEvent.id,
|
||||||
|
|
Loading…
Reference in New Issue