Added missing icon & fixed single reply no root.

This commit is contained in:
Thomas Mathews 2022-12-30 17:30:37 -08:00
parent 239c9bfb62
commit 4f41be23cc
2 changed files with 7 additions and 4 deletions

1
icon/event-details.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M414.9 31.11L270.9 495.1C266.1 507.8 253.5 514.8 240.9 510.9C228.2 506.1 221.1 493.5 225.1 480.9L369.1 16.89C373 4.226 386.5-2.852 399.1 1.077C411.8 5.006 418.9 18.45 414.9 31.11V31.11zM504.4 118.5L632.4 238.5C637.3 243 640 249.4 640 255.1C640 262.6 637.3 268.1 632.4 273.5L504.4 393.5C494.7 402.6 479.6 402.1 470.5 392.4C461.4 382.7 461.9 367.6 471.6 358.5L580.9 255.1L471.6 153.5C461.9 144.4 461.4 129.3 470.5 119.6C479.6 109.9 494.7 109.4 504.4 118.5V118.5zM168.4 153.5L59.09 255.1L168.4 358.5C178.1 367.6 178.6 382.7 169.5 392.4C160.4 402.1 145.3 402.6 135.6 393.5L7.585 273.5C2.746 268.1 0 262.6 0 255.1C0 249.4 2.746 243 7.585 238.5L135.6 118.5C145.3 109.4 160.4 109.9 169.5 119.6C178.6 129.3 178.1 144.4 168.4 153.5V153.5z"/></svg>

After

Width:  |  Height:  |  Size: 977 B

View file

@ -147,10 +147,12 @@ async function send_post() {
}
function new_reply_tags(ev) {
return [
["e", ev.id, "", "reply"],
["p", ev.pubkey],
];
const tags = [["e", ev.id, "", "reply"]];
if (ev.refs.root) {
tags.push(["e", ev.refs.root, "", "root"]);
}
tags.push(["p", ev.pubkey]);
return tags;
}
async function create_reply(pubkey, content, ev, all=true) {