Adds NIP-22 as replies to Interactive Stories.

This commit is contained in:
Vitor Pamplona
2024-11-27 11:41:13 -05:00
parent fd88dfed7d
commit 04da076d95
3 changed files with 9 additions and 2 deletions

View File

@@ -106,6 +106,11 @@ class CommentEvent(
) {
val tags = mutableListOf<Array<String>>()
if (replyingTo.event is AddressableEvent) {
tags.add(removeTrailingNullsAndEmptyOthers("A", replyingTo.event.addressTag(), replyingTo.relay))
tags.add(removeTrailingNullsAndEmptyOthers("a", replyingTo.event.addressTag(), replyingTo.relay))
}
tags.add(removeTrailingNullsAndEmptyOthers("E", replyingTo.event.id, replyingTo.relay, replyingTo.event.pubKey))
tags.add(arrayOf("K", "${replyingTo.event.kind}"))

View File

@@ -32,7 +32,8 @@ class InteractiveStoryPrologueEvent(
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : InteractiveStoryBaseEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
) : InteractiveStoryBaseEvent(id, pubKey, createdAt, KIND, tags, content, sig),
RootScope {
companion object {
const val KIND = 30296
const val ALT = "The prologue of an interative story called "

View File

@@ -32,7 +32,8 @@ class InteractiveStorySceneEvent(
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : InteractiveStoryBaseEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
) : InteractiveStoryBaseEvent(id, pubKey, createdAt, KIND, tags, content, sig),
RootScope {
companion object {
const val KIND = 30297
const val ALT = "A scene of an interative story called "