Merge pull request #1372 from PR0M3TH3AN/ai/schema-validate-20250222-1045837655123295994

chore(ai): event schema validation tool + fixes
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-19 09:20:48 -05:00
commit e9ce138e71
5 files changed
+406 -26

No files matched your search

+5 -7
View File
@@ -22,6 +22,7 @@ import {
} from "../utils/hashtagNormalization.js";
import { getActiveSigner } from "../nostr/client.js";
import { buildPublicUrl, buildR2Key } from "../r2.js";
import { buildProfileMetadataEvent } from "../nostrEventSchemas.js";
const noop = () => {};
@@ -6376,14 +6377,11 @@ export class ProfileModalController {
}
try {
const content = JSON.stringify(profile);
const event = {
kind: 0,
created_at: Math.floor(Date.now() / 1000),
const event = buildProfileMetadataEvent({
pubkey,
tags: [],
content,
};
created_at: Math.floor(Date.now() / 1000),
metadata: profile,
});
const result =
await this.services.nostrClient.signAndPublishEvent(event);