1
- import { EventKind , NostrEvent , RelayUrl } from "../core/types .ts" ;
1
+ import { TagName , EventKind , NostrEvent , RelayUrl } from "../core/nips/01 .ts" ;
2
2
import type { Optional } from "../core/types.ts" ;
3
3
import { EventInit } from "./events.ts" ;
4
4
@@ -17,16 +17,16 @@ export class TextNoteComposer extends TransformStream<TextNoteInit, TextNote> {
17
17
compose (
18
18
init : TextNoteInit ,
19
19
opts ?: {
20
- reply_to ?: NostrEvent ;
21
- relay_recommend ?: RelayUrl ;
20
+ replyTo ?: NostrEvent ;
21
+ relayRecommend ?: RelayUrl ;
22
22
} ,
23
23
) : TextNote {
24
- const relay_recommend = opts ?. relay_recommend ?? this . opts . relay_recommend ;
24
+ const relayRecommend = opts ?. relayRecommend ?? this . opts . relay_recommend ;
25
25
26
26
// deno-fmt-ignore
27
- const tags = ( init . tags ?? [ ] ) . concat ( opts ?. reply_to ? [
28
- [ "e" , opts . reply_to . id , relay_recommend ?? "" ] ,
29
- [ "p" , opts . reply_to . pubkey , relay_recommend ?? "" ] ,
27
+ const tags = ( init . tags ?? [ ] ) . concat ( opts ?. replyTo ? [
28
+ [ "e" as TagName , opts . replyTo . id , relayRecommend ?? "" ] ,
29
+ [ "p" as TagName , opts . replyTo . pubkey , relayRecommend ?? "" ] ,
30
30
] : [ ] ) ;
31
31
32
32
return { ...init , kind : EventKind . TextNote , tags } ;
0 commit comments