fix types, imports and other stuff on nip17 and nip59.

This commit is contained in:
fiatjaf
2024-10-25 22:10:05 -03:00
parent a72e47135a
commit e2ec7a4b55
4 changed files with 21 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
import { PrivateDirectMessage } from './kinds.ts'
import { getPublicKey } from './pure'
import * as nip59 from './nip59'
import { EventTemplate, getPublicKey } from './pure.ts'
import * as nip59 from './nip59.ts'
type Recipient = {
publicKey: string
@@ -17,10 +17,11 @@ function createEvent(
message: string,
conversationTitle?: string,
replyTo?: ReplyTo,
) {
const baseEvent = {
): EventTemplate {
const baseEvent: EventTemplate = {
created_at: Math.ceil(Date.now() / 1000),
kind: PrivateDirectMessage,
tags: [] as (string | string[])[],
tags: [],
content: message,
}