web: don't copy tags when replying
otherwise this crazy stuff happens: https://nostr.com/e/da28aefc824cc7880e79df547cbe7f1e9d21e2ab81a264e311280d11b427ce05
This commit is contained in:
parent
f773ab49f6
commit
bb27b1c339
2 changed files with 6 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
||||||
<script defer src="js/noble-secp256k1.js?v=1"></script>
|
<script defer src="js/noble-secp256k1.js?v=1"></script>
|
||||||
<script defer src="js/bech32.js?v=1"></script>
|
<script defer src="js/bech32.js?v=1"></script>
|
||||||
<script defer src="js/nostr.js?v=6"></script>
|
<script defer src="js/nostr.js?v=6"></script>
|
||||||
<script defer src="js/damus.js?v=86"></script>
|
<script defer src="js/damus.js?v=87"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1078,9 +1078,12 @@ function gather_reply_tags(pubkey, from) {
|
||||||
for (const tag of from.tags) {
|
for (const tag of from.tags) {
|
||||||
if (tag.length >= 2) {
|
if (tag.length >= 2) {
|
||||||
if (tag[0] === "e") {
|
if (tag[0] === "e") {
|
||||||
tags.push(tag)
|
if (tag.length >= 4 && tag[3] == "root")
|
||||||
|
tags.push(tag)
|
||||||
|
else
|
||||||
|
tags.push(["e", tag[1]])
|
||||||
} else if (tag[0] === "p" && tag[1] !== pubkey) {
|
} else if (tag[0] === "p" && tag[1] !== pubkey) {
|
||||||
tags.push(tag)
|
tags.push(["p", tag[1]])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue