mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
14 lines
363 B
TypeScript
14 lines
363 B
TypeScript
import { NostrEvent } from '@nostrify/nostrify';
|
|
|
|
/** Return a normalized event without any non-standard keys. */
|
|
export function purifyEvent(event: NostrEvent): NostrEvent {
|
|
return {
|
|
id: event.id,
|
|
pubkey: event.pubkey,
|
|
kind: event.kind,
|
|
content: event.content,
|
|
tags: event.tags,
|
|
sig: event.sig,
|
|
created_at: event.created_at,
|
|
};
|
|
}
|